Software Source Code
Version 2 (J. Simmons, 12/11/2016 09:47 am)
| 1 | 2 | J. Simmons | h1. Project Software |
|---|---|---|---|
| 2 | 1 | J. Simmons | |
| 3 | 2 | J. Simmons | {{>toc}} |
| 4 | 1 | J. Simmons | |
| 5 | 2 | J. Simmons | h2. Introduction |
| 6 | 1 | J. Simmons | |
| 7 | 2 | J. Simmons | The Holoseat project has three software elements. The first software element is the firmware running on the Holoseat controller. The second software element is the desktop configuration app. And the third software element is the test rig software (composed of more firmware and test execution software). This page covers each of these elements and the serial protocol between the Holoseat controller and the desktop configuration app. |
| 8 | 1 | J. Simmons | |
| 9 | 2 | J. Simmons | h2. Controller Firmware |
| 10 | 1 | J. Simmons | |
| 11 | 2 | J. Simmons | tbd |
| 12 | 1 | J. Simmons | |
| 13 | 2 | J. Simmons | h2. Desktop App |
| 14 | 2 | J. Simmons | |
| 15 | 2 | J. Simmons | tbd |
| 16 | 2 | J. Simmons | |
| 17 | 2 | J. Simmons | h2. Test Rig Software |
| 18 | 2 | J. Simmons | |
| 19 | 2 | J. Simmons | tbd |
| 20 | 2 | J. Simmons | |
| 21 | 2 | J. Simmons | h2. HoloSeat Serial Protocol |
| 22 | 2 | J. Simmons | |
| 23 | 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. |
| 24 | 2 | J. Simmons | |
| 25 | 2 | J. Simmons | h3. Protocol Commands |
| 26 | 2 | J. Simmons | |
| 27 | 2 | J. Simmons | The HSP supports three commands. Each command is made up of a single upper case character indicating the statement type. One command, the (S)et statement, also takes an input string. |
| 28 | 2 | J. Simmons | |
| 29 | 2 | J. Simmons | * @?@ - Ready(?) command; used to determine if the HoloSeat is ready to receive commands over the HSP (will reply with the (R)eady message followed by one standard state message if the HoloSeat is ready) |
| 30 | 2 | J. Simmons | * @S <config string>@ - (S)et command; used to send updated configuration to HoloSeat (HoloSeat will reply with @OK@ on success). The config string has the following format: |
| 31 | 2 | J. Simmons | @<WFC>,<WBC>,<E>,<TC>,<L>,<LI>@ - example: @S w,s,0,60,0,20@ |
| 32 | 2 | J. Simmons | ** @<WFC>@ - Walk forward character (example: w) |
| 33 | 2 | J. Simmons | ** @<WBC>@ - Walk backward character (example: s) |
| 34 | 2 | J. Simmons | ** @<E>@ - Enabled? Must be a @0@ (disabled) or a @1@ (enabled) (example: 1) |
| 35 | 2 | J. Simmons | ** @<TC>@ - Trigger cadence (example: 65) |
| 36 | 2 | J. Simmons | ** @<L>@ - Logging enabled? Must be a @0@ (disabled) or a @1@ (enabled) (example: 1) |
| 37 | 2 | J. Simmons | ** @<LI>@ - Logging interval in deci-seconds (example: 10) |
| 38 | 2 | J. Simmons | * @Q@ - (Q)uery command; used to request the HoloSeat send one standard state message (see *Protocol Messages* below) |
| 39 | 2 | J. Simmons | |
| 40 | 2 | J. Simmons | h3. Protocol Messages |
| 41 | 2 | J. Simmons | |
| 42 | 2 | J. Simmons | The HSP has two messages. One is a single character message similar to the commands 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. |
| 43 | 2 | J. Simmons | |
| 44 | 2 | J. Simmons | * @R@ - (R)eady; sent by the HoloSeat to indicate it is ready for serial communication; sent in reply to the Ready(?) command and when serial port is attached in debug mode (to be added) |
| 45 | 2 | J. Simmons | * @<VER>,<WFC>(<DWFC>),<WBC>(<DWBC>),<E>(<DE>),<C>/<TC>(<DTC>),<L>(<DL>)/<LI>(<DLI>)@ - standard state message, see below for key; example: @1.2.3,w(w),s(s),1(1),70/65(75),1(0)/10(10)@ |
| 46 | 2 | J. Simmons | ** @<VER>@ - Firmware version string (example: 1.2.3) |
| 47 | 2 | J. Simmons | ** @<WFC>@ - Walk forward character (example: w) |
| 48 | 2 | J. Simmons | ** @<DWFC>@ - Default walk forward character (example: w) |
| 49 | 2 | J. Simmons | ** @<WBC>@ - Walk backward character (example: s) |
| 50 | 2 | J. Simmons | ** @<DWBC>@ - Default walk backward character (example: s) |
| 51 | 2 | J. Simmons | ** @<E>@ - Enabled? Must be a @0@ (disabled) or a @1@ (enabled) (example: 1) |
| 52 | 2 | J. Simmons | ** @<DE>@ - Default enabled state, same format as @<E>@ (example: 1) |
| 53 | 2 | J. Simmons | ** @<C>@ - Current cadence rounded to whole number; positive value means direction is forward, negative value means direction is backward (example: 70) |
| 54 | 2 | J. Simmons | ** @<TC>@ - Trigger cadence (example: 65) |
| 55 | 2 | J. Simmons | ** @<DTC>@ - Default trigger cadence (example: 75) |
| 56 | 2 | J. Simmons | ** @<L>@ - Logging enabled? Must be a @0@ (disabled) or a @1@ (enabled) (example: 1) |
| 57 | 2 | J. Simmons | ** @<DL>@ - Default logging enabled, same format as @<L>@ (example: 0) |
| 58 | 2 | J. Simmons | ** @<LI>@ - Logging interval in deci-seconds (example: 10) |
| 59 | 2 | J. Simmons | ** @<DLI>@ - Default logging interval in deci-seconds (example: 10) |
| 60 | 2 | J. Simmons | |
| 61 | 2 | J. Simmons | h3. Protocol Usage |
| 62 | 2 | J. Simmons | |
| 63 | 2 | J. Simmons | Always start a serial session by sending a Ready(?) command. If a (R)eady message is not received, wait and try again until a timeout is reached or a (R)eady message is received. Be sure to check the version string sent in the initial standard state message to ensure your app is compatible with the version of the HoloSeat firmware. |
| 64 | 2 | J. Simmons | |
| 65 | 2 | J. Simmons | After you have initialized your connection, you can then use the (Set) and (Q)uery commands as necessary to control and observe the HoloSeat's state. |