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