Firmware Notes

Version 2 (J. Simmons, 06/27/2016 09:09 pm)

1 1 J. Simmons
h1. Firmware Notes
2 1 J. Simmons
3 1 J. Simmons
{{>toc}}
4 1 J. Simmons
5 1 J. Simmons
The firmware for the *Holoseat* can be found in the SVN Repository.  Its basic function is to detect pedal events from the sensor, use the timing of those events to determine the cadence (in RPM), and then send the walk command (generally by pressing the 'w' key) when the pedal speed is greater than the specified trigger speed.
6 1 J. Simmons
7 1 J. Simmons
h2. Default Parameter Values
8 1 J. Simmons
9 1 J. Simmons
The default parameters for the firmware are stored in the @holoseat_constants.h@ file so they will be available at start up without the need for a connection to the desktop control application.  The desktop control application modifies the default values by updating the values of the corresponding constants in this file and then flashing updated firmware to the Holoseat.  The following parameters have default values in the constants file.
10 1 J. Simmons
11 1 J. Simmons
* Default Walk Character - what key is sent to move the character in the game
12 1 J. Simmons
* Default Holoseat Enabled - is the Holoseat enabled by default?
13 1 J. Simmons
* Default Trigger Cadence - how fast does the user need to pedal (in RPM) to trigger walking?
14 1 J. Simmons
* Default Logging Enabled - is serial logging enabled by default?
15 1 J. Simmons
* Default Logging Interval - how long between messages in serial logging in deci-seconds (0.1 of a second)
16 1 J. Simmons
17 1 J. Simmons
h2. HoloSeat Serial Protocol
18 1 J. Simmons
19 2 J. Simmons
The HoloSeat firmware has a serial protocol, the Holoseat Serial Protocol (HSP), to enable the desktop control application to modify all key parameters and to determine the current configuration of the Holoseat.
20 2 J. Simmons
21 2 J. Simmons
h3. Protocol Statements
22 2 J. Simmons
23 2 J. Simmons
The HSP supports two command statements.  Each statement is made up of a single upper case character indicating the statement type.  One statement, the *S*et statement, also takes an input string.
24 2 J. Simmons
25 2 J. Simmons
h3. Protocol Messages
26 2 J. Simmons
27 2 J. Simmons
The HSP has two messages.  One is a single character message similar to the command statements and one is the HSP standard state message which is sent after initialization, in reply to a *Q*uery command, and as the serial logging message.