Current Server Time: 00:32 (Central Europe)

#apertus IRC Channel Logs

2013/09/25

Timezone: UTC


06:57
PhilippeJ
joined the channel
10:28
Bertl
morning everyone!
10:40
PhilippeJ
left the channel
12:03
sashacohen
joined the channel
13:50
Bertl
hello sashacohen!
13:50
sashacohen
hello bertl, how are you tonight?
13:51
Bertl
still afternoon here .. I'm great, thanks!
13:51
Bertl
how are you?
15:32
sashacohen
left the channel
16:00
se6astian
joined the channel
16:00
se6astian
Evening!
18:30
Bertl
evening!
18:40
dmj_nova
joined the channel
19:02
Bertl
hey dmj_nova! LTNS!
19:07
se6astian
Bertl, could you describe how you can write/read registers from the commandline?
19:08
Bertl
http://vserver.13thfloor.at/Stuff/AXIOM/SCRIPTS/cmv_init.sh
19:08
Bertl
this changes the registers 69/98/102/107/108/112 and 124 and reads the register 127
19:10
Bertl
basically the registers get mapped to 32bit spaces starting at a specific memory address (0x60000000 in this case), reading from that memory will show the register, writing to that memory will change it
19:10
Bertl
so register '0' is at 0x60000000, register '1' at 0x60000004 ...
19:17
se6astian
documented
19:17
se6astian
https://wiki.apertus.org/index.php?title=Axiom_Alpha_Prototype
19:18
Bertl
// doesn't work in (ba)sh '#' is the comment character :)
19:19
se6astian
ah yes thanks
19:37
se6astian
what does an output for a get command look like?
19:37
se6astian
single integer number?
19:40
Bertl
http://paste.linux-vserver.org/25160
19:40
Bertl
this is the actual output of the cmv_init.sh script
19:41
Bertl
note that the output for writes is because a write is followed by a read to work around the write bug :)
19:42
Bertl
the data itself is 32bit, lower 16bit significant, the upper 16bit are zeroes
19:48
se6astian
ok my first (ba)sh script, dont laugh :)
19:48
se6astian
get_bitdepth () {
19:48
se6astian
$depth=`cmv_reg 118`
19:48
se6astian
if test $depth = 0x00000000
19:48
se6astian
then
19:48
se6astian
echo "12 bit mode"
19:48
se6astian
fi
19:48
se6astian
}
19:48
se6astian
remove the "test"
19:49
se6astian
now I dont know if the values will be interpreted as string or actual numbers though
19:51
Bertl
yeah, well, if you use (ba)sh, then you can do something like:
19:51
Bertl
depth=$(( `cmv_reg 118` + 0 ))
19:51
Bertl
note that there is no $ before depth in an assignment
19:52
se6astian
ah good to know :)
19:52
Bertl
the result will be an integer which can be compared like this:
19:52
Bertl
[ $depth -eq 0 ] && echo "12 bit mode"
19:53
se6astian
so I do need the $ when I use the variable but not to declare it?
19:53
Bertl
yes, $name always gets replaced by the value unless you use single quotes :)
19:53
Bertl
(see man (ba)sh)
19:59
se6astian
ok!
20:00
se6astian
so we will create a "functions.sh" file that sets/gets the most important camera parameters right?
20:00
se6astian
and put it on Github
20:01
Bertl
for example, but make sure that it is modular
20:01
se6astian
https://wiki.apertus.org/index.php?title=Axiom_Alpha_Prototype#Reading_and_Writing_Sensor_Register
20:02
se6astian
modular?
20:02
Bertl
check out the gpio.func and i2c.func
20:05
Bertl
what I mean is, do not hard code anything which doesn't need to be hard coded, use existing building blocks to build more complex units and make sure the functions can be 'included' (i.e. sourced)
20:07
se6astian
ok
21:09
se6astian
ok time for bed
21:09
se6astian
tomorow I will continue my work on the alpha enclosure plans
21:09
Bertl
k, have a good nigh then
21:10
Bertl
*night even
21:13
se6astian
left the channel