March 27, 2023

Hacking on my BBB based macro focus stand software

I am just swapping cameras, replacing my Canon 1D Mark 3 with a new Canon R5. The current software sends two shutter commands. The way the camera is configured, the first raises the mirror and the second trips the shutter. The new mirrorless R5 has no mirror, and only one pulse is required.

Because modern ssh clients refuse to talk to the ancient sshd on the BBB running Angstrom linux, I have to use "putty", which works just fine. Vim however uses some idiotic color scheme -- in particular rendering dark blue against a black background, which is all but unreadable.

So we need to relearn how to change vim color schemes. You can type :colorscheme to find out what is being used (I get the all but uninformative reply, "default". Next to find out what schemes are available, you can do this:

ls /usr/share/vim/vim72/colors
To change to one of these, type :colors desert. And in fact "desert" yields a readable result. To make this permanent, edit the .vimrc file and add the line "colorscheme desert". I place it just below "syntax on" and am happy for now.

I'll note once again that Angstrom is not set up for filename completion, and that fixing this is non trivial. We will abandon Angstrom as soon as we can.

The Angstrom setup also has vim doing matches on parts of search strings before I finish typing them -- which drives me crazy. The fix for this is:

set noincsearch

Changing javascript code

I make a copy of gui.js (to gui_dslr.js) then it is as follows:
cd gui
vi gui.js
This file is 399 lines at present. This is server side code, the browser side is in gui.html and uses jquery and socket.io (which were the hot thing when this was written).

Testing the new code

Using putty, I get a wide screen without having to use an stty commend. I see that "dropbear" is the ssh server that angstrom is using.

My node.js server is running as per a line: "/usr/bin/node gui.js". I kill this and start the new code. After some fussing around it seems to be working.


Feedback? Questions? Drop me a line!

Tom's Computer Info / tom@mmto.org