173 KiB
API Reference
| Name | Description |
|---|---|
WII5 |
Common base class for WII5 drivers and controllers. |
WII5GPS |
GPS driver: u-blox NMEA via TinyGPS++. |
WII5RTC |
|
WII5Help |
|
WII5Mode |
Base class for run-time operating modes. |
WII5Maths |
|
WII5Power |
|
WII5Setup |
|
WII5Config |
|
WII5Sh3dIO |
|
WII5Battery |
|
WII5BinData |
Binary message format for Iridium SBD. |
WII5Display |
|
WII5Iridium |
Driver for the Iridium 9602/9603 SBD modem. |
WII5Sparton |
Driver for the Sparton AHRS-M1 / AHRS-M2 IMU. |
WII5Strings |
|
WII5Commands |
Text-protocol command parser and dispatcher. |
WII5Sh3dUtil |
|
WII5ModeSleep |
Sleep mode: long sleeps between wake-ups. |
WII5Controller |
Top-level firmware controller. |
WII5Sh3dConfig |
|
WII5ModeCapture |
Capture mode: time-driven IMU data capture and SD logging. |
WII5Sh3dConsole |
Console abstraction over multiple Stream objects. |
WII5ModePosition |
Position mode: periodic GPS + Iridium telemetry only. |
WII5ModeSelfTest |
Self test mode: automated hardware checkout. |
WII5SerialManager |
|
WII5Communications |
Communications orchestration: manages a state machine across Iridium send/receive cycles, including pulling messages from SD blocks and splitting them across multiple SBD frames when too large. |
WII5ModeLowBattery |
Low-battery mode: degraded operation when supply is depleted. |
WII5ModeManualTest |
Manual test mode: operator-driven hardware exercise. |
WII5Weather_18B20 |
|
typeConfig |
|
WII5Command |
|
WII5Processed |
|
WII5Processed1 |
|
WII5Processed2 |
|
WII5_BINDATA_0 |
|
WII5_BINDATA_1 |
|
WII5_BINDATA_2 |
|
WII5_BINDATA_3 |
|
WII5_BINDATA_4 |
|
WII5_BINDATA_5 |
|
WII5_BINDATA_6 |
|
WII5_BINDATA_7 |
|
WII5_BINDATA_8 |
|
WII5_BINDATA_9 |
|
WII5_BINDATA_10 |
|
WII5_BINDATA_11 |
|
WII5_BINDATA_12 |
|
WII5_BINDATA_13 |
|
WII5_BINDATA_14 |
|
WII5_BINDATA_15 |
|
WII5_Data_Config |
|
WII5MetaDataObject |
|
WII5_BINDATA_HEADER |
|
WII5_DATA_SpartonBinary |
Enumerations
WII5SELFTEST_DEVICES
enum WII5SELFTEST_DEVICES
| Value | Description |
|---|---|
WII5STD_BOARD |
|
WII5STD_GPS |
|
WII5STD_EEPROM |
|
WII5STD_SD1 |
|
WII5STD_SD2 |
|
WII5STD_IRIDIUM |
|
WII5STD_BATTERY |
|
WII5STD_MATHS |
|
WII5STD_RTC |
|
WII5STD_SPARTON |
|
WII5STD_18B20 |
|
WII5STD_BUTTON |
|
WII5STD_LED |
|
WII5STD_BUZZER |
|
WII5STD_5VOLT |
|
WII5STD_DEVICES |
WII5SELFTEST_STATUS
enum WII5SELFTEST_STATUS
| Value | Description |
|---|---|
WII5STS_NONE |
|
WII5STS_NC |
|
WII5STS_SUCCESS |
|
WII5STS_HUMAN |
|
WII5STS_SLOW |
|
WII5STS_POWER |
|
WII5STS_TIMEOUT |
|
WII5STS_OUTOFRANGE |
|
WII5STS_UNKNOWN |
WII5_DEVICES
enum WII5_DEVICES
| Value | Description |
|---|---|
WII5DEVICE_UNKNOWN |
|
WII5DEVICE_WAVEBUOY |
|
WII5DEVICE_MATHS |
|
WII5DEVICE_CONTROLLER |
|
WII5DEVICE_CLI |
|
WII5DEVICE_SERVER |
WII5_CONTROLLERS
enum WII5_CONTROLLERS
| Value | Description |
|---|---|
WII5CONTROLLER_UNKNOWN |
|
WII5CONTROLLER_DRIVER |
|
WII5CONTROLLER_CONFIG |
|
WII5CONTROLLER_CONTROLLER |
|
WII5CONTROLLER_COMMANDS |
|
WII5CONTROLLER_DISPLAY |
|
WII5CONTROLLER_HELP |
|
WII5CONTROLLER_SETUP |
|
WII5CONTROLLER_STRINGS |
|
WII5CONTROLLER_METADATA |
WII5_DRIVERS
enum WII5_DRIVERS
| Value | Description |
|---|---|
WII5DRIVER_UNKNOWN |
|
WII5DRIVER_GPS |
|
WII5DRIVER_MATHS |
|
WII5DRIVER_COMMS |
|
WII5DRIVER_COMMS_IRIDIUM |
|
WII5DRIVER_MPU9250 |
|
WII5DRIVER_POWER |
|
WII5DRIVER_SPARTON |
|
WII5DRIVER_STORAGE |
|
WII5DRIVER_WEATHER_18B20 |
|
WII5DRIVER_BATTERY |
|
WII5DRIVER_RADIO |
|
WII5DRIVER_RTC |
|
WII5DRIVER_WDT |
WII5_PORTS
enum WII5_PORTS
| Value | Description |
|---|---|
WII5PORT_UNKNOWN |
|
WII5PORT_RADIO |
|
WII5PORT_COMMS |
|
WII5PORT_CONSOLE |
|
WII5PORT_MATHS |
WII5_MATHSMODE
enum WII5_MATHSMODE
| Value | Description |
|---|---|
WII5MATHSMODE_UNKNOWN |
|
WII5MATHSMODE_AUTO |
|
WII5MATHSMODE_BUTTON |
|
WII5MATHSMODE_COMMS |
WII5_AREAS
enum WII5_AREAS
| Value | Description |
|---|---|
WII5AREA_UNKNOWN |
|
WII5AREA_WII5 |
|
WII5AREA_HELP |
|
WII5AREA_SH3D |
WII5_COMMANDS
enum WII5_COMMANDS
| Value | Description |
|---|---|
WII5COMMAND_NONE |
|
WII5COMMAND_NA |
|
WII5COMMAND_HELP |
|
WII5COMMAND_LOG_DEBUG |
|
WII5COMMAND_LOG_DEFAULT |
|
WII5COMMAND_LOG_FATAL |
|
WII5COMMAND_LOG_ERROR |
|
WII5COMMAND_LOG_TEST |
|
WII5COMMAND_HELLO |
|
WII5COMMAND_HELLOACK |
|
WII5COMMAND_RESET |
|
WII5COMMAND_STORAGE_FORMAT |
|
WII5COMMAND_ECHO |
|
WII5COMMAND_PEOPLE |
|
WII5COMMAND_BATTERY_START |
|
WII5COMMAND_WEATHER_READ |
|
WII5COMMAND_SET |
|
WII5COMMAND_SEND |
|
WII5COMMAND_WEATHER_TEST |
|
WII5COMMAND_MODE_SELFTEST |
|
WII5COMMAND_MODE_MANUALTEST |
|
WII5COMMAND_MODE_SLEEP |
|
WII5COMMAND_MODE_DEFAULT |
|
WII5COMMAND_MODE_POSITION |
|
WII5COMMAND_MODE_CAPTURE |
|
WII5COMMAND_STATUS |
|
WII5COMMAND_DUMP |
|
WII5COMMAND_WAITX |
|
WII5COMMAND_WAITY |
|
WII5COMMAND_WAITZ |
|
WII5COMMAND_WAITQ |
|
WII5COMMAND_WAITS |
|
WII5COMMAND_SETTING_LIST |
|
WII5COMMAND_SETTING_DEVICEID |
|
WII5COMMAND_SETTING_GPSTIMEOUT |
|
WII5COMMAND_SETTING_DEFAULTS |
|
WII5COMMAND_SETTING_RESET |
|
WII5COMMAND_SETTING_MODE |
|
WII5COMMAND_SETTING_TIME |
|
WII5COMMAND_SETTING_DISABLELOWBATTERY |
|
WII5COMMAND_SETTING_FLAGS |
|
WII5COMMAND_SETTING_CAPTUREOPTIONS |
|
WII5COMMAND_SETTING_POSITIONOPTIONS |
|
WII5COMMAND_SETTING_SLEEPOPTIONS |
|
WII5COMMAND_SETTING_BATTERYOPTIONS |
|
WII5COMMAND_GPS_MODE |
|
WII5COMMAND_GPS_DUMP |
|
WII5COMMAND_GPS_PASSTHROUGH |
|
WII5COMMAND_GPS_DEBUG |
|
WII5COMMAND_GPS_START |
|
WII5COMMAND_GPS_STOP |
|
WII5COMMAND_GPS_TIME |
|
WII5COMMAND_GPS_POS |
|
WII5COMMAND_GPS_ACCURATE |
|
WII5COMMAND_SPARTON_MODE |
|
WII5COMMAND_SPARTON_DUMP |
|
WII5COMMAND_SPARTON_DEBUG |
|
WII5COMMAND_SPARTON_PASSTHROUGH |
|
WII5COMMAND_SPARTON_INFO |
|
WII5COMMAND_MATHS_START |
|
WII5COMMAND_MATHS_STOP |
|
WII5COMMAND_MATHS_BEEP |
|
WII5COMMAND_MATHS_RESTART |
|
WII5COMMAND_MATHS_SHUTDOWN |
|
WII5COMMAND_MATHS_HALT |
|
WII5COMMAND_MATHS_BOOTED |
|
WII5COMMAND_MATHS_KEEPALIVE |
|
WII5COMMAND_MATHS_WIFI_LOCAL |
|
WII5COMMAND_MATHS_WIFI_WAP |
|
WII5COMMAND_MATHS_SHELL |
|
WII5COMMAND_MATHS_HOLD |
|
WII5COMMAND_MATHS_FLIP |
|
WII5COMMAND_MATHS_REPROCESS |
|
WII5COMMAND_MATHS_BUILD |
|
WII5COMMAND_MATHS_FIRMWARE |
|
WII5COMMAND_MATHS_PATCHLOCAL |
|
WII5COMMAND_MATHS_UNTIL |
|
WII5COMMAND_MATHS_INFO |
|
WII5COMMAND_MATHS_DO |
|
WII5COMMAND_MATHS_MAKE |
|
WII5COMMAND_MATHS_SCRIPT |
|
WII5COMMAND_MATHS_DONE |
|
WII5COMMAND_MATHS_RETURN |
|
WII5COMMAND_STORAGE_START |
|
WII5COMMAND_STORAGE_STOP |
|
WII5COMMAND_STORAGE_TESTFILE |
|
WII5COMMAND_STORAGE_CONSOLEFILE |
|
WII5COMMAND_STORAGE_SERIALFILE |
|
WII5COMMAND_STORAGE_SETSTATUS |
|
WII5COMMAND_STORAGE_OFF |
|
WII5COMMAND_STORAGE_SD1 |
|
WII5COMMAND_STORAGE_SD2 |
|
WII5COMMAND_STORAGE_LIST |
|
WII5COMMAND_STORAGE_VIEW |
|
WII5COMMAND_STORAGE_RESULTS |
|
WII5COMMAND_STORAGE_DEBUG |
|
WII5COMMAND_STORAGE_STATUS |
|
WII5COMMAND_STORAGE_RAW |
|
WII5COMMAND_STORAGE_METADATA |
|
WII5COMMAND_NETWORK_ECHO |
|
WII5COMMAND_NETWORK_ECHOACK |
|
WII5COMMAND_NETWORK_FAKEECHO |
|
WII5COMMAND_NETWORK_FAKEECHOACK |
|
WII5COMMAND_CAPTURE_START |
|
WII5COMMAND_CAPTURE_STOP |
|
WII5COMMAND_POSITION_START |
|
WII5COMMAND_POSITION_STOP |
|
WII5COMMAND_POSITION_PASSTHROUGH |
|
WII5COMMAND_BINDATA_LIST |
|
WII5COMMAND_BINDATA_SPLIT |
|
WII5COMMAND_IRIDIUM_SEND |
|
WII5COMMAND_COMMUNICATIONS_DISABLED |
|
WII5COMMAND_COMMUNICATIONS_TEST |
|
WII5COMMAND_COMMUNICATIONS_START |
|
WII5COMMAND_COMMUNICATIONS_STOP |
|
WII5COMMAND_COMMUNICATIONS_SIGNAL |
WII5_RESULTS
enum WII5_RESULTS
| Value | Description |
|---|---|
WII5RESULTS_UNKNOWN |
|
WII5RESULTS_SUCCESS |
|
WII5RESULTS_INVALID |
|
WII5RESULTS_RETRY |
|
WII5RESULTS_ERROR |
|
WII5RESULTS_NOREPLY |
WII5_STATUS
enum WII5_STATUS
| Value | Description |
|---|---|
WII5STATUS_UNKNOWN |
|
WII5STATUS_OFF |
|
WII5STATUS_ON |
|
WII5STATUS_ON_VALID |
|
WII5STATUS_BUSY |
|
WII5STATUS_WAITING |
|
WII5STATUS_ERROR |
WII5_ERRORS
enum WII5_ERRORS
| Value | Description |
|---|---|
WII5ERROR_UNKNOWN |
|
WII5ERROR_NONE |
|
WII5ERROR_RETRY |
|
WII5ERROR_INIT |
|
WII5ERROR_MEMORY |
|
WII5ERROR_TIMEOUT |
|
WII5ERROR_FATAL |
WII5_SERIALCMDS
enum WII5_SERIALCMDS
| Value | Description |
|---|---|
WII5SERIALCMD_NONE |
|
WII5SERIALCMD_OK |
|
WII5SERIALCMD_WAITING |
|
WII5SERIALCMD_TIMEOUT |
|
WII5SERIALCMD_ERROR |
WII5_MODES
enum WII5_MODES
| Value | Description |
|---|---|
WII5MODE_NONE |
|
WII5MODE_BOOT |
Invalid ! |
WII5MODE_START |
|
WII5MODE_DEMO |
|
WII5MODE_SLEEP |
|
WII5MODE_LOWBATTERY |
|
WII5MODE_POSITION |
|
WII5MODE_CAPTURE |
|
WII5MODE_MANUALTEST |
|
WII5MODE_SELFTEST |
WII5_FLAGS
enum WII5_FLAGS
| Value | Description |
|---|---|
WII5FLAGS_GPSDISABLE |
|
WII5FLAGS_RTCDISABLE |
|
WII5FLAGS_RADIOOFF |
|
WII5FLAGS_ENABLELOGS |
|
WII5FLAGS_DEBUGLOGS |
|
WII5FLAGS_DISABLEBEEP |
WII5GPS_MODES
enum WII5GPS_MODES
| Value | Description |
|---|---|
WII5GPS_UNKNOWN |
|
WII5GPS_OFF |
|
WII5GPS_ON |
|
WII5GPS_TIME |
|
WII5GPS_POS |
|
WII5GPS_ACCURATE |
|
WII5GPS_REPEAT |
WII5_SWITCH
enum WII5_SWITCH
| Value | Description |
|---|---|
WII5SWITCH_NONE |
|
WII5SWITCH_ON |
|
WII5SWITCH_OFF |
|
WII5SWITCH_TOGGLE |
WII5IRIDIUM_SEND_RESULT
enum WII5IRIDIUM_SEND_RESULT
| Value | Description |
|---|---|
WII5IRIDIUMSENDRESULT_NONE |
|
WII5IRIDIUMSENDRESULT_OK |
|
WII5IRIDIUMSENDRESULT_FAILED_TIMEOUT |
|
WII5IRIDIUMSENDRESULT_FAILED_OTHER |
WII5IRIDIUM_RECEIVE_RESULT
enum WII5IRIDIUM_RECEIVE_RESULT
| Value | Description |
|---|---|
WII5IRIDIUMRECEIVERESULT_NONE |
|
WII5IRIDIUMRECEIVERESULT_OK |
WII5MATHS_STEPS
enum WII5MATHS_STEPS
| Value | Description |
|---|---|
WII5MATHS_UNKNOWN |
|
WII5MATHS_WARN |
|
WII5MATHS_OFF |
|
WII5MATHS_ASK |
|
WII5MATHS_REBOOT |
|
WII5MATHS_BOOT |
|
WII5MATHS_BOOT_WAIT |
|
WII5MATHS_READY |
|
WII5MATHS_HOLD_ON |
|
WII5MATHS_FINISH |
enum
| Value | Description |
|---|---|
LED_OFF |
|
LED_ON |
|
LED_SLOW |
|
LED_FAST |
|
LED_SHORT |
|
LED_DOUBLE |
|
LED_TRIPPLE |
|
LED_SHORT_LONG |
|
LED_DOUBLE_LONG |
|
LED_TRIPPLE_LONG |
|
LED_SHORT_GAP |
|
LED_DOUBLE_GAP |
|
LED_TRIPPLE_GAP |
|
LED_ONE |
|
LED_TWO |
|
LED_THREE |
|
LED_FOUR |
|
LED_FIVE |
|
LED_SIX |
|
LED_SEVEN |
|
LED_EIGHT |
|
LED_NINE |
|
LED_TEN |
|
LED_ONCE |
|
LED_TWICE |
WII5BATTERY_STEPS
enum WII5BATTERY_STEPS
| Value | Description |
|---|---|
WII5BATTERY_OFF |
|
WII5BATTERY_ON |
|
WII5BATTERY_MEASURE |
|
WII5BATTERY_STORE |
|
WII5BATTERY_ANALYSE |
|
WII5BATTERY_FINISH |
WII5IRIDIUM_REQUEST
enum WII5IRIDIUM_REQUEST
| Value | Description |
|---|---|
WII5IRIDIUM_REQUEST_NONE |
|
WII5IRIDIUM_REQUEST_FIRMWARE |
|
WII5IRIDIUM_REQUEST_TIME |
|
WII5IRIDIUM_REQUEST_SIGNALQUALITY |
|
WII5IRIDIUM_REQUEST_SENDTEXT |
|
WII5IRIDIUM_REQUEST_SENDBIN |
WII5IRIDIUM_STATUS
enum WII5IRIDIUM_STATUS
| Value | Description |
|---|---|
WII5IRIDIUM_STATUS_READY |
|
WII5IRIDIUM_STATUS_BUSY |
|
WII5IRIDIUM_STATUS_FAILED |
WII5IRIDIUM_STEPS
enum WII5IRIDIUM_STEPS
| Value | Description |
|---|---|
WII5IRIDIUM_OFF |
|
WII5IRIDIUM_POWER |
|
WII5IRIDIUM_ALIVE |
|
WII5IRIDIUM_BOOT |
|
WII5IRIDIUM_FIRMWARE |
|
WII5IRIDIUM_IMEI |
|
WII5IRIDIUM_SYSTERMTIME |
|
WII5IRIDIUM_SIGNALQUALITY_WAIT |
|
WII5IRIDIUM_SIGNALQUALITY |
|
WII5IRIDIUM_RETRY |
|
WII5IRIDIUM_SEND_JUMP |
|
WII5IRIDIUM_PREPARE_TEXT |
|
WII5IRIDIUM_SEND |
|
WII5IRIDIUM_PREPARE_BIN1 |
|
WII5IRIDIUM_PREPARE_BIN2 |
|
WII5IRIDIUM_RECEIVE |
|
WII5IRIDIUM_RECEIVE_BIN |
|
WII5IRIDIUM_WAITING |
|
WII5IRIDIUM_STOP_PREPARE |
|
WII5IRIDIUM_END |
WII5IRIDIUM_RETURNS
enum WII5IRIDIUM_RETURNS
| Value | Description |
|---|---|
WII5IRIDIUM_RETURN_AT |
|
WII5IRIDIUM_RETURN_OK |
|
WII5IRIDIUM_RETURN_READY |
|
WII5IRIDIUM_RETURN_ERROR |
|
WII5IRIDIUM_RETURN_SBDI |
|
WII5IRIDIUM_RETURN_CSQ |
|
WII5IRIDIUM_RETURN_MSSTM |
|
WII5IRIDIUM_RETURN_BINARY |
WII5SPARTON_STEPS
enum WII5SPARTON_STEPS
| Value | Description |
|---|---|
WII5SPARTON_OFF |
|
WII5SPARTON_BOOT |
|
WII5SPARTON_BOOT_BAUD |
|
WII5SPARTON_BOOT_STOP |
|
WII5SPARTON_BOOT_WAIT |
|
WII5SPARTON_READY |
|
WII5SPARTON_PROGRAM_BASE |
|
WII5SPARTON_PROGRAM_START |
|
WII5SPARTON_CAPTURE |
|
WII5SPARTON_PROGRAM_STOP |
|
WII5SPARTON_INFO |
|
WII5SPARTON_INFO_WAIT |
|
WII5SPARTON_CANCEL |
|
WII5SPARTON_FINISH |
WII5SLEEP_STEPS
enum WII5SLEEP_STEPS
| Value | Description |
|---|---|
WII5SLEEP_START |
|
WII5SLEEP_WAIT |
|
WII5SLEEP_SLEEPING |
|
WII5SLEEP_BUTTONS |
|
WII5SLEEP_UPDATE |
|
WII5SLEEP_TIME |
|
WII5SLEEP_COMMS |
|
WII5SLEEP_FINISH |
WII5CAPTURE_TYPE
enum WII5CAPTURE_TYPE
| Value | Description |
|---|---|
WII5CAPTURETYPE_UNKNOWN |
|
WII5CAPTURETYPE_MANUAL |
|
WII5CAPTURETYPE_TIME |
WII5CAPTURE_STEPS
enum WII5CAPTURE_STEPS
| Value | Description |
|---|---|
WII5CAPTURE_START |
|
WII5CAPTURE_OFF |
|
WII5CAPTURE_TIME |
|
WII5CAPTURE_PREPARE |
|
WII5CAPTURE_PREPARE_SD |
|
WII5CAPTURE_PREPARE_COMMS |
|
WII5CAPTURE_PREPARE_ID |
|
WII5CAPTURE_PREPARE_SPARTON |
|
WII5CAPTURE_WAIT |
|
WII5CAPTURE_INPROGRESS |
|
WII5CAPTURE_SHUTDOWN |
|
WII5CAPTURE_PROCESS |
|
WII5CAPTURE_SEND_PREPARE |
|
WII5CAPTURE_SEND_METADATA |
|
WII5CAPTURE_SEND_RAW |
|
WII5CAPTURE_CANCEL_RESTART |
|
WII5CAPTURE_CANCEL_OFF |
|
WII5CAPTURE_MANUAL_OFF |
|
WII5CAPTURE_WAIT5_OFF |
|
WII5CAPTURE_FLIP |
|
WII5CAPTURE_WAIT_COMMS_MATHS |
|
WII5CAPTURE_FINISH |
WII5LOWBATTERY_STEPS
enum WII5LOWBATTERY_STEPS
| Value | Description |
|---|---|
WII5LOWBATTERY_START |
|
WII5LOWBATTERY_STROBE |
|
WII5LOWBATTERY_TIME |
|
WII5LOWBATTERY_GPS_START |
|
WII5LOWBATTERY_GPS_WAIT |
|
WII5LOWBATTERY_IRIDIUM_WAIT |
|
WII5LOWBATTERY_END |
WII5SELFTEST_STEPS
enum WII5SELFTEST_STEPS
| Value | Description |
|---|---|
WII5ST_START |
|
WII5ST_SHUTDOWN |
|
WII5ST_INFORMATION |
|
WII5ST_LED |
|
WII5ST_BUZZER |
|
WII5ST_BUTTON |
|
WII5ST_CONFIG |
|
WII5ST_GPS_RECEIVE |
|
WII5ST_GPS_OFF |
|
WII5ST_SD0 |
|
WII5ST_SD1 |
|
WII5ST_SD2 |
|
WII5ST_SD1_B |
|
WII5ST_SD2_B |
|
WII5ST_SD_OFF |
|
WII5ST_IRIDIUM |
|
WII5ST_BATTERY_1 |
|
WII5ST_BATTERY_2 |
|
WII5ST_WEATHER |
|
WII5ST_MATHS_START |
|
WII5ST_MATHS_OFF |
|
WII5ST_5VOLT_START |
|
WII5ST_5VOLT_OFF |
|
WII5ST_RTC |
|
WII5ST_SPARTON |
|
WII5ST_REPORT |
WII5SELFTEST_MODE
enum WII5SELFTEST_MODE
| Value | Description |
|---|---|
WII5SM_DEFAULT |
|
WII5SM_FROMMATHS |
|
WII5SM_NOMATHS |
WII5SERIAL_PARSERS
enum WII5SERIAL_PARSERS
| Value | Description |
|---|---|
WII5SERIALPARSER_NONE |
|
WII5SERIALPARSER_LINE |
|
WII5SERIALPARSER_BINARY1 |
|
WII5SERIALPARSER_RECORD |
|
WII5SERIALPARSER_OKHUH |
|
WII5SERIALPARSER_AT |
WII5SERIAL_LAST
enum WII5SERIAL_LAST
| Value | Description |
|---|---|
WII5SERIALLAST_NONE |
|
WII5SERIALLAST_LINE |
|
WII5SERIALLAST_RECORD |
|
WII5SERIALLAST_OK |
|
WII5SERIALLAST_READY |
|
WII5SERIALLAST_ERROR |
|
WII5SERIALLAST_ATOK |
|
WII5SERIALLAST_ATERR |
|
WII5SERIALLAST_ATSBDI |
|
WII5SERIALLAST_BOOTVERSION |
|
WII5SERIALLAST_NUMBER |
|
WII5SERIALLAST_ATCSQ |
WII5COMMUNICATIONS_STEPS
enum WII5COMMUNICATIONS_STEPS
| Value | Description |
|---|---|
WII5COMMUNICATIONS_DISABLED |
|
WII5COMMUNICATIONS_IDLE |
|
WII5COMMUNICATIONS_PREPARE |
|
WII5COMMUNICATIONS_IRIDIUM_START |
|
WII5COMMUNICATIONS_JUMP |
|
WII5COMMUNICATIONS_FIND |
|
WII5COMMUNICATIONS_SD_NEXT |
|
WII5COMMUNICATIONS_SD_BLOCK |
|
WII5COMMUNICATIONS_IRIDIUM_SEND |
|
WII5COMMUNICATIONS_IRIDIUM_SEND_WAIT |
|
WII5COMMUNICATIONS_END |
WII5POSITION_STEPS
enum WII5POSITION_STEPS
| Value | Description |
|---|---|
WII5POSITION_START |
|
WII5POSITION_STROBE |
|
WII5POSITION_TIME |
|
WII5POSITION_GPS_START |
|
WII5POSITION_GPS_WAIT |
|
WII5POSITION_IRIDIUM_WAIT |
|
WII5POSITION_END |
Typedefs
time_t
unsigned long time_t()
CallbackFunction
void(* CallbackFunction()
Functions
debugDo
void debugDo(uint32_t n)
Debug breadcrumb: print "DEBUG POINT: " to SerialConsole.
debugDo
void debugDo(uint32_t n)
Debug breadcrumb: print "DEBUG POINT: " to SerialConsole.
syncProvider
uint32_t syncProvider()
wii5_getPinMode
int wii5_getPinMode(uint8_t pin)
sizeExtra
uint16_t sizeExtra()
readExtra
void readExtra(char * data, uint16_t len, uint16_t offset)
updateExtra
void updateExtra(char * data, uint16_t len, uint16_t offset)
ds
OneWire ds(WEATHER_18B20_DATA)
Variables
wii5BufferString
char wii5BufferString
wii5BufferConsolePrint
char wii5BufferConsolePrint
wii5BufferConsoleCmd
char wii5BufferConsoleCmd
wii5BufferIridium
char wii5BufferIridium
wii5BinaryIridium
char wii5BinaryIridium
wii5BufferGPS
char wii5BufferGPS
wii5BufferString
char wii5BufferString
wii5BufferConsolePrint
char wii5BufferConsolePrint
wii5BufferConsoleCmd
char wii5BufferConsoleCmd
wii5BufferIridium
char wii5BufferIridium
wii5BinaryIridium
char wii5BinaryIridium
wii5BufferGPS
char wii5BufferGPS
wii5Gps
WII5GPS wii5Gps
wii5RTC
WII5RTC wii5RTC
wii5Help
WII5Help wii5Help
wii5Gps
WII5GPS wii5Gps
wii5Maths
WII5Maths wii5Maths
rtc
RTC_DS3231 rtc
wii5RTC
WII5RTC wii5RTC
wii5Setup
WII5Setup wii5Setup
wii5Config
WII5Config wii5Config
wii5Help
WII5Help wii5Help
sh3dNodeIO
WII5Sh3dIO sh3dNodeIO
wii5Battery
WII5Battery wii5Battery
wii5BinData
WII5BinData wii5BinData
wii5Display
WII5Display wii5Display
wii5Iridium
WII5Iridium wii5Iridium
wii5Maths
WII5Maths wii5Maths
wii5Setup
WII5Setup wii5Setup
wii5Sparton
WII5Sparton wii5Sparton
wii5Strings
WII5Strings wii5Strings
wii5Commands
WII5Commands wii5Commands
wii5Config
WII5Config wii5Config
sh3dNodeIO
WII5Sh3dIO sh3dNodeIO
sh3dNodeUtil
WII5Sh3dUtil sh3dNodeUtil
wii5Battery
WII5Battery wii5Battery
wii5BinData
WII5BinData wii5BinData
bit
uint8_t bit
port
uint8_t port
reg
volatile uint8_t * reg
out
volatile uint8_t * out
minutes
uint32_t minutes
used
uint32_t used
a_start
uint8_t a_start
a_end
uint8_t a_end
p
uint8_t p
wii5Display
WII5Display wii5Display
wii5Iridium
WII5Iridium wii5Iridium
wii5ModeSleep
WII5ModeSleep wii5ModeSleep
firstBoot
bool firstBoot = true
c
char c
first
bool first
startReady
uint8_t startReady
wii5Sparton
WII5Sparton wii5Sparton
wii5Strings
WII5Strings wii5Strings
wii5Commands
WII5Commands wii5Commands
wii5Controller
WII5Controller wii5Controller
sh3dNodeConfig
WII5Sh3dConfig sh3dNodeConfig
sh3dNodeUtil
WII5Sh3dUtil sh3dNodeUtil
wii5ModeCapture
WII5ModeCapture wii5ModeCapture
wii5ModeSleep
WII5ModeSleep wii5ModeSleep
console
WII5Sh3dConsole console
wii5Controller
WII5Controller wii5Controller
wii5ModeLowBattery
WII5ModeLowBattery wii5ModeLowBattery
wii5ModeSelfTest
WII5ModeSelfTest wii5ModeSelfTest
sh3dNodeConfig
WII5Sh3dConfig sh3dNodeConfig
test1
elapsedMillis test1
wii5ModeCapture
WII5ModeCapture wii5ModeCapture
console
WII5Sh3dConsole console
wii5Communications
WII5Communications wii5Communications
wii5ModePosition
WII5ModePosition wii5ModePosition
wii5ModeManualTest
WII5ModeManualTest wii5ModeManualTest
wii5ModePosition
WII5ModePosition wii5ModePosition
wii5ModeSelfTest
WII5ModeSelfTest wii5ModeSelfTest
ds
OneWire ds
wii5Weather_18B20
WII5Weather_18B20 wii5Weather_18B20
wii5Communications
WII5Communications wii5Communications
wii5ModeLowBattery
WII5ModeLowBattery wii5ModeLowBattery
sdPrev
uint16_t sdPrev = 0
spartonData
WII5_DATA_SpartonBinary * spartonData
binDataType
uint32_t binDataType = 0
firstLoop
bool firstLoop
captureWriteTime
elapsedMicros captureWriteTime
captureWriteTemp
uint32_t captureWriteTemp
captureWriteMax
uint32_t captureWriteMax = 0
captureWriteMin
uint32_t captureWriteMin = 1000000
captureWriteOver
uint32_t captureWriteOver = 0
wii5ModeManualTest
WII5ModeManualTest wii5ModeManualTest
wii5Weather_18B20
WII5Weather_18B20 wii5Weather_18B20
WII5
#include <WII5.h>
Subclassed by:
WII5Commands,WII5Controller,WII5Power,WII5Setup
Common base class for WII5 drivers and controllers.
Provides controllerId/driverId virtuals so subclasses identify themselves to logging and status helpers. Concrete subclasses include WII5Power (power-managed peripherals), WII5Mode (run-time modes), and the various sensor / radio drivers.
Public Methods
| Return | Name | Description |
|---|---|---|
WII5 inline |
||
WII5_CONTROLLERS |
controllerId virtual |
Identify the controller category for logging/status. |
WII5_DRIVERS |
driverId virtual |
Identify the driver category for logging/status. |
bool |
SJ virtual |
Sanity check: is the given timestamp in a plausible epoch range? |
WII5
inline
inline WII5()
controllerId
virtual
virtual WII5_CONTROLLERS controllerId()
Identify the controller category for logging/status.
driverId
virtual
virtual WII5_DRIVERS driverId()
Identify the driver category for logging/status.
SJ
virtual
virtual bool SJ(DdW when)
Sanity check: is the given timestamp in a plausible epoch range?
WII5GPS
#include <WII5GPS.h>
Inherits:
WII5Power,WII5SerialManager
GPS driver: u-blox NMEA via TinyGPS++.
Manages power-on, fix acquisition, and clock-update flows. NMEA sentences are parsed off the WII5SerialManager base; the result feeds the global wii5Gps.gps (TinyGPSPlus) instance for location/altitude/HDOP queries.
Public Attributes
| Return | Name | Description |
|---|---|---|
uint32_t |
lastRunTime |
|
time_t |
when |
|
elapsedMillis |
sinceOnLast |
lastRunTime
uint32_t lastRunTime
when
time_t when
sinceOnLast
elapsedMillis sinceOnLast
Public Methods
| Return | Name | Description |
|---|---|---|
WII5GPS inline |
||
WII5_CONTROLLERS |
controllerId virtual inline |
Identify the controller category for logging/status. |
WII5_DRIVERS |
driverId virtual inline |
Identify the driver category for logging/status. |
void |
begin |
One-time bring-up; pin config comes from the active board file. |
void |
loop virtual |
State-machine tick: drains NMEA, advances mode. |
void |
setMinutes |
Set how long the GPS stays on each acquisition window. |
uint8_t |
getMinutes |
Current acquisition window length, in minutes. |
void |
dump |
Print a status dump; toOther optionally mirrors to a second Print. |
void |
off |
Power off the GPS module. |
void |
on |
Power on the GPS module. |
void |
autoTime |
One-shot acquisition tuned for time only. |
void |
autoPos |
One-shot acquisition tuned for position. |
void |
autoAccurate |
Long acquisition for high-quality fix. |
void |
autoRepeat |
Periodic re-acquisition (continuous mode). |
bool |
ready |
True once a valid fix is available. |
bool |
isError |
True if the most recent acquisition failed. |
bool |
isTimeValid |
True if the time fix is valid (independent of position). |
bool |
isRunning |
True if a state-machine cycle is in flight. |
bool |
old |
True if the last fix is older than the configured timeout. |
WII5GPS
inline
inline WII5GPS()
controllerId
virtual inline
virtual inline WII5_CONTROLLERS controllerId()
Identify the controller category for logging/status.
driverId
virtual inline
virtual inline WII5_DRIVERS driverId()
Identify the driver category for logging/status.
begin
void begin()
One-time bring-up; pin config comes from the active board file.
loop
virtual
virtual void loop()
State-machine tick: drains NMEA, advances mode.
setMinutes
void setMinutes(uint8_t newMinutes)
Set how long the GPS stays on each acquisition window.
getMinutes
uint8_t getMinutes()
Current acquisition window length, in minutes.
dump
void dump(bool toConsole, Print * toOther)
Print a status dump; toOther optionally mirrors to a second Print.
off
void off()
Power off the GPS module.
on
void on()
Power on the GPS module.
autoTime
void autoTime()
One-shot acquisition tuned for time only.
autoPos
void autoPos()
One-shot acquisition tuned for position.
autoAccurate
void autoAccurate()
Long acquisition for high-quality fix.
autoRepeat
void autoRepeat()
Periodic re-acquisition (continuous mode).
ready
bool ready()
True once a valid fix is available.
isError
bool isError()
True if the most recent acquisition failed.
isTimeValid
bool isTimeValid()
True if the time fix is valid (independent of position).
isRunning
bool isRunning()
True if a state-machine cycle is in flight.
old
bool old()
True if the last fix is older than the configured timeout.
Protected Attributes
| Return | Name | Description |
|---|---|---|
WII5_ERRORS |
lastError |
|
bool |
finished |
|
bool |
running |
|
WII5GPS_MODES |
step |
|
WII5GPS_MODES |
stepLast |
|
bool |
first |
|
elapsedMillis |
stepWait |
|
uint8_t |
minutes |
|
elapsedMillis |
waitTime |
|
elapsedMillis |
runTime |
|
elapsedMillis |
lastTime |
lastError
WII5_ERRORS lastError
finished
bool finished
running
bool running
step
WII5GPS_MODES step
stepLast
WII5GPS_MODES stepLast
first
bool first
stepWait
elapsedMillis stepWait
minutes
uint8_t minutes
waitTime
elapsedMillis waitTime
runTime
elapsedMillis runTime
lastTime
elapsedMillis lastTime
Protected Methods
| Return | Name | Description |
|---|---|---|
void |
start virtual |
|
void |
stop virtual |
start
virtual
virtual void start(bool force)
stop
virtual
virtual void stop(bool force)
WII5RTC
#include <WII5RTC.h>
Public Methods
| Return | Name | Description |
|---|---|---|
WII5RTC inline |
||
WII5_CONTROLLERS |
controllerId virtual inline |
|
WII5_DRIVERS |
driverId virtual inline |
|
void |
begin |
|
void |
test |
|
void |
setRTC |
|
float |
getTemperature |
WII5RTC
inline
inline WII5RTC()
controllerId
virtual inline
virtual inline WII5_CONTROLLERS controllerId()
driverId
virtual inline
virtual inline WII5_DRIVERS driverId()
begin
void begin()
test
void test()
setRTC
void setRTC(uint32_t t)
getTemperature
float getTemperature()
Protected Attributes
| Return | Name | Description |
|---|---|---|
bool |
testDone |
testDone
bool testDone
WII5Help
#include <WII5Help.h>
Public Methods
| Return | Name | Description |
|---|---|---|
WII5Help inline |
||
WII5_CONTROLLERS |
controllerId virtual inline |
|
bool |
processConsoleCsv |
WII5Help
inline
inline WII5Help()
controllerId
virtual inline
virtual inline WII5_CONTROLLERS controllerId()
processConsoleCsv
bool processConsoleCsv()
Protected Methods
| Return | Name | Description |
|---|---|---|
bool |
displayIndex |
|
bool |
display404 |
|
bool |
displayList |
|
bool |
displayInfo |
|
bool |
displayGeneral |
|
bool |
displayMaths |
|
bool |
displayHardware |
|
bool |
displayData |
|
bool |
displayTesting |
|
bool |
displayAdvanced |
|
bool |
displaySettings |
|
bool |
displaySparton |
|
bool |
displayIridium |
|
bool |
displayGps |
|
bool |
displayStorage |
displayIndex
bool displayIndex()
display404
bool display404()
displayList
bool displayList()
displayInfo
bool displayInfo()
displayGeneral
bool displayGeneral()
displayMaths
bool displayMaths()
displayHardware
bool displayHardware()
displayData
bool displayData()
displayTesting
bool displayTesting()
displayAdvanced
bool displayAdvanced()
displaySettings
bool displaySettings()
displaySparton
bool displaySparton()
displayIridium
bool displayIridium()
displayGps
bool displayGps()
displayStorage
bool displayStorage()
WII5Mode
#include <WII5Mode.h>
Subclassed by:
WII5Communications,WII5ModeCapture,WII5ModeLowBattery,WII5ModeManualTest,WII5ModePosition,WII5ModeSelfTest,WII5ModeSleep
Base class for run-time operating modes.
Each subclass owns a small state machine that is ticked by WII5Controller::loop() while that mode is active. Concrete modes include WII5ModeCapture, WII5ModeSleep, WII5ModePosition, WII5ModeManualTest, WII5ModeSelfTest, and WII5ModeLowBattery.
Public Methods
| Return | Name | Description |
|---|---|---|
void |
begin virtual |
One-time bring-up. |
void |
loop virtual |
State-machine tick while this mode is active. |
begin
virtual
virtual void begin()
One-time bring-up.
loop
virtual
virtual void loop()
State-machine tick while this mode is active.
Protected Attributes
| Return | Name | Description |
|---|---|---|
elapsedMillis |
wait |
wait
elapsedMillis wait
WII5Maths
#include <WII5Maths.h>
Inherits:
WII5Power
Public Attributes
| Return | Name | Description |
|---|---|---|
time_t |
lastStartTime |
|
uint32_t |
lastRunTime |
lastStartTime
time_t lastStartTime
lastRunTime
uint32_t lastRunTime
Public Methods
| Return | Name | Description |
|---|---|---|
WII5Maths inline |
||
WII5_CONTROLLERS |
controllerId virtual inline |
Identify the controller category for logging/status. |
WII5_DRIVERS |
driverId virtual inline |
Identify the driver category for logging/status. |
void |
setDebug |
|
bool |
getDebug |
|
void |
begin |
|
void |
loop |
|
void |
start |
|
void |
stop |
|
void |
powerOff virtual |
|
void |
powerOn virtual |
|
void |
setMathsUntil |
|
time_t |
getMathsUntil |
|
bool |
isRunning |
|
bool |
isOff |
|
void |
gpioClick |
|
void |
setHold |
|
void |
woops_on |
|
void |
cancelHold |
|
bool |
processHold |
|
void |
setReturnLine |
|
void |
cancelReturnLine |
|
uint32_t |
remainingHold |
|
uint32_t |
remainingUntil |
|
bool |
isMode |
|
void |
sendTime |
|
void |
sendQueue |
|
bool |
queueCommand |
|
void |
queueDone |
WII5Maths
inline
inline WII5Maths()
controllerId
virtual inline
virtual inline WII5_CONTROLLERS controllerId()
Identify the controller category for logging/status.
driverId
virtual inline
virtual inline WII5_DRIVERS driverId()
Identify the driver category for logging/status.
setDebug
void setDebug(bool in)
getDebug
bool getDebug()
begin
void begin()
loop
void loop()
start
void start(WII5_MATHSMODE mm)
stop
void stop(bool force)
powerOff
virtual
virtual void powerOff(bool force)
powerOn
virtual
virtual void powerOn(bool force)
setMathsUntil
void setMathsUntil(time_t t)
getMathsUntil
time_t getMathsUntil()
isRunning
bool isRunning()
isOff
bool isOff()
gpioClick
void gpioClick()
setHold
void setHold(uint32_t in, bool allowLower)
woops_on
void woops_on()
cancelHold
void cancelHold()
processHold
bool processHold()
setReturnLine
void setReturnLine()
cancelReturnLine
void cancelReturnLine()
remainingHold
uint32_t remainingHold()
remainingUntil
uint32_t remainingUntil()
isMode
bool isMode(WII5_MATHSMODE mm)
sendTime
void sendTime()
sendQueue
void sendQueue()
queueCommand
bool queueCommand(char * val, uint8_t valSize)
queueDone
void queueDone()
Protected Attributes
| Return | Name | Description |
|---|---|---|
uint8_t |
queueCount |
|
char |
queueMessage |
|
elapsedMillis |
queueLast |
|
uint8_t |
queueRetry |
|
bool |
running |
|
bool |
debug |
|
WII5_MATHSMODE |
mathsMode |
|
uint8_t |
retry |
|
bool |
firstboot |
|
time_t |
mathsUntil |
|
elapsedMillis |
returnlineWait |
|
elapsedMillis |
holdWait |
|
uint32_t |
holdFor |
|
WII5MATHS_STEPS |
step |
|
WII5MATHS_STEPS |
stepLast |
|
elapsedMillis |
stepWait |
|
elapsedMillis |
displayWait |
|
elapsedMillis |
timeWait |
queueCount
uint8_t queueCount
queueMessage
char queueMessage
queueLast
elapsedMillis queueLast
queueRetry
uint8_t queueRetry
running
bool running
debug
bool debug
mathsMode
WII5_MATHSMODE mathsMode
retry
uint8_t retry
firstboot
bool firstboot
mathsUntil
time_t mathsUntil
returnlineWait
elapsedMillis returnlineWait
holdWait
elapsedMillis holdWait
holdFor
uint32_t holdFor
step
WII5MATHS_STEPS step
stepLast
WII5MATHS_STEPS stepLast
stepWait
elapsedMillis stepWait
displayWait
elapsedMillis displayWait
timeWait
elapsedMillis timeWait
WII5Power
#include <WII5Power.h>
Inherits:
WII5Subclassed by:WII5Battery,WII5GPS,WII5Iridium,WII5Maths,WII5Sparton,WII5Weather_18B20
Public Methods
| Return | Name | Description |
|---|---|---|
WII5Power inline |
||
WII5_DRIVERS |
driverId virtual inline |
Identify the driver category for logging/status. |
void |
powerSetPin |
|
void |
powerSetShared |
|
void |
powerOn virtual |
|
void |
powerOff virtual |
|
void |
powerInput virtual |
|
bool |
powerStatus |
|
uint32_t |
powerLast |
|
uint32_t |
powerElapsed |
|
uint32_t |
powerLastTotal |
WII5Power
inline
inline WII5Power()
driverId
virtual inline
virtual inline WII5_DRIVERS driverId()
Identify the driver category for logging/status.
powerSetPin
void powerSetPin(uint8_t p, bool onHigh, uint8_t pOff, uint8_t pulse)
powerSetShared
void powerSetShared(WII5Power * s)
powerOn
virtual
virtual void powerOn(bool force)
powerOff
virtual
virtual void powerOff(bool force)
powerInput
virtual
virtual void powerInput()
powerStatus
bool powerStatus()
powerLast
uint32_t powerLast()
powerElapsed
uint32_t powerElapsed()
powerLastTotal
uint32_t powerLastTotal()
Protected Attributes
| Return | Name | Description |
|---|---|---|
uint8_t |
powerData_Pin |
|
uint8_t |
powerData_PinOff |
|
uint8_t |
powerData_Pulse |
|
bool |
powerData_OnIsHigh |
|
WII5Power * |
powerData_Shared |
|
bool |
powerData_On |
|
bool |
powerData_Input |
|
elapsedMillis |
powerData_Elapsed |
|
time_t |
powerData_Last |
|
uint32_t |
powerData_LastTotal |
powerData_Pin
uint8_t powerData_Pin
powerData_PinOff
uint8_t powerData_PinOff
powerData_Pulse
uint8_t powerData_Pulse
powerData_OnIsHigh
bool powerData_OnIsHigh
powerData_Shared
WII5Power * powerData_Shared
powerData_On
bool powerData_On
powerData_Input
bool powerData_Input
powerData_Elapsed
elapsedMillis powerData_Elapsed
powerData_Last
time_t powerData_Last
powerData_LastTotal
uint32_t powerData_LastTotal
WII5Setup
#include <WII5Setup.h>
Inherits:
WII5
Public Methods
| Return | Name | Description |
|---|---|---|
WII5_CONTROLLERS |
controllerId virtual inline |
Identify the controller category for logging/status. |
void |
begin |
|
void |
beginSafe |
|
void |
bootbeep |
|
void |
shutdownbeep |
|
void |
setupPower |
|
void |
setupConsole |
|
void |
setupNetwork |
|
void |
setupIO |
|
void |
setupWII5 |
|
void |
sleepBefore |
|
void |
sleepAfter |
controllerId
virtual inline
virtual inline WII5_CONTROLLERS controllerId()
Identify the controller category for logging/status.
begin
void begin()
beginSafe
void beginSafe()
bootbeep
void bootbeep()
shutdownbeep
void shutdownbeep()
setupPower
void setupPower()
setupConsole
void setupConsole()
setupNetwork
void setupNetwork()
setupIO
void setupIO()
setupWII5
void setupWII5()
sleepBefore
void sleepBefore(bool mathsOn)
sleepAfter
void sleepAfter()
Protected Attributes
| Return | Name | Description |
|---|---|---|
bool |
_setupPower |
|
bool |
_setupIO |
|
bool |
_setupWII5 |
|
bool |
_setupConsole |
|
bool |
_setupNetwork |
_setupPower
bool _setupPower
_setupIO
bool _setupIO
_setupWII5
bool _setupWII5
_setupConsole
bool _setupConsole
_setupNetwork
bool _setupNetwork
WII5Config
#include <WII5Config.h>
Public Methods
WII5Config
inline
inline WII5Config()
controllerId
virtual inline
virtual inline WII5_CONTROLLERS controllerId()
begin
void begin()
getDeviceId
uint32_t getDeviceId()
setDeviceId
void setDeviceId(uint32_t newId)
_checkMode
bool _checkMode(WII5_MODES newMode, uint32_t v1, uint32_t v2, uint32_t v3, uint32_t v4)
setDefaultMode
void setDefaultMode(WII5_MODES newMode)
getDefaultMode
WII5_MODES getDefaultMode()
setTemporaryMode
void setTemporaryMode(time_t exp, WII5_MODES newMode)
getTemporaryMode
WII5_MODES getTemporaryMode()
setCapturePeriod
void setCapturePeriod(uint32_t in)
getCapturePeriod
uint32_t getCapturePeriod()
setCaptureRecords
void setCaptureRecords(uint32_t in)
getCaptureRecords
uint32_t getCaptureRecords()
setCaptureBinaryType
void setCaptureBinaryType(uint32_t in)
getCaptureBinaryType
uint32_t getCaptureBinaryType()
setPositionPeriod
void setPositionPeriod(uint32_t in)
getPositionPeriod
uint32_t getPositionPeriod()
setPositionBinaryType
void setPositionBinaryType(uint32_t in)
getPositionBinaryType
uint32_t getPositionBinaryType()
setSleepBinaryType
void setSleepBinaryType(uint32_t in)
getSleepBinaryType
uint32_t getSleepBinaryType()
setSleepPeriod
void setSleepPeriod(uint32_t in)
getSleepPeriod
uint32_t getSleepPeriod()
setSleepUntil
void setSleepUntil(uint32_t in)
getSleepUntil
uint32_t getSleepUntil()
setDisableLowBattery
void setDisableLowBattery(time_t exp)
getDisableLowBattery
time_t getDisableLowBattery()
updateRecordCount
uint32_t updateRecordCount()
getRecordCount
uint32_t getRecordCount()
resetCounters
void resetCounters()
readConfigData
void readConfigData()
updateConfigData
void updateConfigData()
resetConfigData
void resetConfigData()
readStatusData
void readStatusData()
updateStatusData
void updateStatusData()
resetStatusData
void resetStatusData()
getFlag
bool getFlag(WII5_FLAGS f)
setFlag
void setFlag(WII5_FLAGS f, bool state)
getGpsTimeout
uint32_t getGpsTimeout()
setGpsTimeout
void setGpsTimeout(uint32_t t)
dump
void dump(bool toConsole, Print * toOther)
getBatteryLow
uint16_t getBatteryLow()
setBatteryLow
void setBatteryLow(uint16_t in)
getBatteryMid
uint16_t getBatteryMid()
setBatteryMid
void setBatteryMid(uint16_t in)
Protected Attributes
| Return | Name | Description |
|---|---|---|
uint32_t |
_deviceId |
|
WII5_Data_Config |
configData |
|
WII5_Data_Config |
statusData |
_deviceId
uint32_t _deviceId
configData
WII5_Data_Config configData
statusData
WII5_Data_Config statusData
WII5Sh3dIO
#include <WII5Sh3dIO.h>
Public Attributes
| Return | Name | Description |
|---|---|---|
PushButton * |
button1 |
|
PushButton * |
button2 |
|
PushButton * |
button3 |
|
PushButton * |
button4 |
button1
PushButton * button1
button2
PushButton * button2
button3
PushButton * button3
button4
PushButton * button4
Public Methods
| Return | Name | Description |
|---|---|---|
void |
preButton |
|
void |
begin |
|
void |
begin |
|
void |
loop |
|
void |
led1Set inline |
|
void |
led1SetTimeout inline |
|
void |
led1SetDefault inline |
|
uint8_t |
led1Get inline |
|
void |
led2Set inline |
|
void |
led2SetTimeout inline |
|
void |
led2SetDefault inline |
|
uint8_t |
led2Get inline |
|
void |
led3Set inline |
|
void |
led3SetTimeout inline |
|
void |
led3SetDefault inline |
|
uint8_t |
led3Get inline |
|
void |
led4Set inline |
|
void |
led4SetTimeout inline |
|
void |
led4SetDefault inline |
|
uint8_t |
led4Get inline |
|
uint8_t |
buttonSleepCheck |
|
void |
sleep |
|
void |
wake |
preButton
void preButton(PushButton * btn1, PushButton * btn2, PushButton * btn3, PushButton * btn4)
begin
void begin(uint8_t led1, uint8_t led2, uint8_t btn1, uint8_t btn2)
begin
void begin(uint8_t led1, uint8_t led2, uint8_t led3, uint8_t led4, uint8_t btn1, uint8_t btn2, uint8_t btn3, uint8_t btn4)
loop
void loop()
led1Set
inline
inline void led1Set(uint8_t m)
led1SetTimeout
inline
inline void led1SetTimeout(uint32_t m)
led1SetDefault
inline
inline void led1SetDefault(uint8_t m)
led1Get
inline
inline uint8_t led1Get()
led2Set
inline
inline void led2Set(uint8_t m)
led2SetTimeout
inline
inline void led2SetTimeout(uint32_t m)
led2SetDefault
inline
inline void led2SetDefault(uint8_t m)
led2Get
inline
inline uint8_t led2Get()
led3Set
inline
inline void led3Set(uint8_t m)
led3SetTimeout
inline
inline void led3SetTimeout(uint32_t m)
led3SetDefault
inline
inline void led3SetDefault(uint8_t m)
led3Get
inline
inline uint8_t led3Get()
led4Set
inline
inline void led4Set(uint8_t m)
led4SetTimeout
inline
inline void led4SetTimeout(uint32_t m)
led4SetDefault
inline
inline void led4SetDefault(uint8_t m)
led4Get
inline
inline uint8_t led4Get()
buttonSleepCheck
uint8_t buttonSleepCheck()
sleep
void sleep()
wake
void wake()
Protected Attributes
| Return | Name | Description |
|---|---|---|
elapsedMillis |
lastLedLoop |
|
uint8_t |
validPacketType |
|
bool |
_begin |
|
uint16_t |
battery_voltage |
|
uint8_t |
led1_pin |
|
bool |
led1_activelow |
|
uint8_t |
led1_mode |
|
uint8_t |
led1_default |
|
uint8_t |
led1_state |
|
elapsedMillis |
led1_timeon |
|
uint32_t |
led1_max |
|
uint8_t |
led2_pin |
|
bool |
led2_activelow |
|
uint8_t |
led2_mode |
|
uint8_t |
led2_default |
|
uint8_t |
led2_state |
|
elapsedMillis |
led2_timeon |
|
uint32_t |
led2_max |
|
uint8_t |
led3_pin |
|
uint8_t |
led3_mode |
|
uint8_t |
led3_default |
|
uint8_t |
led3_state |
|
elapsedMillis |
led3_timeon |
|
uint32_t |
led3_max |
|
uint8_t |
led4_pin |
|
uint8_t |
led4_mode |
|
uint8_t |
led4_default |
|
uint8_t |
led4_state |
|
elapsedMillis |
led4_timeon |
|
uint32_t |
led4_max |
|
uint8_t |
button1_pin |
|
bool |
button1_activelow |
|
uint8_t |
button2_pin |
|
bool |
button2_activelow |
|
uint8_t |
button3_pin |
|
bool |
button3_activelow |
|
uint8_t |
button4_pin |
|
bool |
button4_activelow |
lastLedLoop
elapsedMillis lastLedLoop
validPacketType
uint8_t validPacketType
_begin
bool _begin
battery_voltage
uint16_t battery_voltage
led1_pin
uint8_t led1_pin
led1_activelow
bool led1_activelow
led1_mode
uint8_t led1_mode
led1_default
uint8_t led1_default
led1_state
uint8_t led1_state
led1_timeon
elapsedMillis led1_timeon
led1_max
uint32_t led1_max
led2_pin
uint8_t led2_pin
led2_activelow
bool led2_activelow
led2_mode
uint8_t led2_mode
led2_default
uint8_t led2_default
led2_state
uint8_t led2_state
led2_timeon
elapsedMillis led2_timeon
led2_max
uint32_t led2_max
led3_pin
uint8_t led3_pin
led3_mode
uint8_t led3_mode
led3_default
uint8_t led3_default
led3_state
uint8_t led3_state
led3_timeon
elapsedMillis led3_timeon
led3_max
uint32_t led3_max
led4_pin
uint8_t led4_pin
led4_mode
uint8_t led4_mode
led4_default
uint8_t led4_default
led4_state
uint8_t led4_state
led4_timeon
elapsedMillis led4_timeon
led4_max
uint32_t led4_max
button1_pin
uint8_t button1_pin
button1_activelow
bool button1_activelow
button2_pin
uint8_t button2_pin
button2_activelow
bool button2_activelow
button3_pin
uint8_t button3_pin
button3_activelow
bool button3_activelow
button4_pin
uint8_t button4_pin
button4_activelow
bool button4_activelow
Protected Methods
| Return | Name | Description |
|---|---|---|
bool |
updateLED |
updateLED
bool updateLED(uint8_t pin, uint8_t mode, uint8_t state)
WII5Battery
#include <WII5Battery.h>
Inherits:
WII5Power
Public Attributes
| Return | Name | Description |
|---|---|---|
elapsedMillis |
age |
|
int32_t |
value |
age
elapsedMillis age
value
int32_t value
Public Methods
| Return | Name | Description |
|---|---|---|
WII5Battery inline |
||
WII5_CONTROLLERS |
controllerId virtual inline |
Identify the controller category for logging/status. |
WII5_DRIVERS |
driverId virtual inline |
Identify the driver category for logging/status. |
void |
begin |
|
void |
loop |
|
void |
start |
|
void |
stop |
|
bool |
isRunning |
WII5Battery
inline
inline WII5Battery()
controllerId
virtual inline
virtual inline WII5_CONTROLLERS controllerId()
Identify the controller category for logging/status.
driverId
virtual inline
virtual inline WII5_DRIVERS driverId()
Identify the driver category for logging/status.
begin
void begin()
loop
void loop()
start
void start(bool force)
stop
void stop(bool force)
isRunning
bool isRunning()
Protected Attributes
| Return | Name | Description |
|---|---|---|
WII5BATTERY_STEPS |
step |
|
elapsedMillis |
stepWait |
|
uint32_t |
stepCount |
|
AvgStd |
avgBattery1 |
|
AvgStd |
avgBattery2 |
step
WII5BATTERY_STEPS step
stepWait
elapsedMillis stepWait
stepCount
uint32_t stepCount
avgBattery1
AvgStd avgBattery1
avgBattery2
AvgStd avgBattery2
Protected Methods
| Return | Name | Description |
|---|---|---|
uint16_t |
scale |
|
uint32_t |
scale |
scale
uint16_t scale(uint16_t data, uint16_t d)
scale
uint32_t scale(uint32_t data, uint32_t d)
WII5BinData
#include <WII5BinData.h>
Binary message format for Iridium SBD.
Each SBD message starts with a WII5_BINDATA_HEADER (binary id 60001, record metadata, a 32-bit bindata_type bitmap), then a sequence of fixed-size payload structs (WII5_BINDATA_0 .. _15) selected by which bits are set in bindata_type. The [getSplit()](#getsplit) helper splits an over-sized type bitmap across multiple 340-byte SBD frames.
Public Methods
| Return | Name | Description |
|---|---|---|
WII5BinData inline |
||
void |
begin |
One-time bring-up. |
bool |
getSplit |
Pop the next chunk that fits in max_size bytes; advances start_bit. |
uint16_t |
getSizeOne |
Size of a single payload struct selected by bit b. |
uint16_t |
setBit |
Set bit b in t and return the modified value. |
uint16_t |
getSize |
Total wire size for a type bitmap, including the header. |
uint16_t |
getSizeObj |
Total payload size for a type bitmap, excluding the header. |
bool |
createData |
Initialize a binary buffer with header for type t. |
bool |
setData |
Fill the payload structs in buf from live device state. |
bool |
setBlockMetadata |
Fill the payload structs from a pre-loaded SD metadata block. |
bool |
setBlockResults |
Fill the payload structs from a pre-loaded SD results (processed) block. |
void |
dumpData |
Print a human-readable dump of the buffer to the console. |
void |
showSizes |
Print the size of every BinData payload type. |
void |
showSplit |
Print the split sequence for a given type bitmap. |
char * |
strTitle |
Human-readable title for payload bit bit. |
bool |
hasType |
Does this buffer's header type-bitmap include bit bit? |
void * |
getData |
Pointer to the payload struct for bit bit inside buf. |
WII5_BINDATA_3 * |
getCommand |
Validate header and return pointer to the embedded command struct. |
void |
showBlocks |
Print the list of bits set in a type bitmap. |
WII5BinData
inline
inline WII5BinData()
begin
void begin()
One-time bring-up.
getSplit
bool getSplit(uint32_t in_t, uint16_t max_size, uint8_t * start_bit, uint32_t * out_t)
Pop the next chunk that fits in max_size bytes; advances start_bit.
getSizeOne
uint16_t getSizeOne(uint8_t b)
Size of a single payload struct selected by bit b.
setBit
uint16_t setBit(uint32_t t, uint8_t b)
Set bit b in t and return the modified value.
getSize
uint16_t getSize(uint32_t t)
Total wire size for a type bitmap, including the header.
getSizeObj
uint16_t getSizeObj(uint32_t t)
Total payload size for a type bitmap, excluding the header.
createData
bool createData(uint32_t t, void * buf, uint16_t maxSize, uint32_t recordCount)
Initialize a binary buffer with header for type t.
setData
bool setData(uint32_t t, void * buf, uint16_t maxSize)
Fill the payload structs in buf from live device state.
setBlockMetadata
bool setBlockMetadata(uint32_t t, void * buf, uint16_t maxSize, WII5MetaDataObject * metadata)
Fill the payload structs from a pre-loaded SD metadata block.
setBlockResults
bool setBlockResults(uint32_t t, void * buf, uint16_t maxSize, WII5Processed * processed)
Fill the payload structs from a pre-loaded SD results (processed) block.
dumpData
void dumpData(void * buf, uint16_t maxSize, bool values)
Print a human-readable dump of the buffer to the console.
showSizes
void showSizes(char * bufout, uint16_t bufsize)
Print the size of every BinData payload type.
showSplit
void showSplit(uint32_t in_t, uint16_t max_size, char * bufout, uint16_t bufsize)
Print the split sequence for a given type bitmap.
strTitle
char * strTitle(uint8_t bit, bool ext)
Human-readable title for payload bit bit.
hasType
bool hasType(uint8_t bit, void * buf, uint16_t maxSize)
Does this buffer's header type-bitmap include bit bit?
getData
void * getData(uint8_t bit, void * buf, uint16_t maxSize)
Pointer to the payload struct for bit bit inside buf.
getCommand
WII5_BINDATA_3 * getCommand(void * buf, uint16_t maxSize)
Validate header and return pointer to the embedded command struct.
showBlocks
void showBlocks(uint32_t t)
Print the list of bits set in a type bitmap.
Protected Attributes
| Return | Name | Description |
|---|---|---|
bool |
testDone |
testDone
bool testDone
WII5Display
#include <WII5Display.h>
Public Methods
| Return | Name | Description |
|---|---|---|
WII5Display inline |
||
WII5_CONTROLLERS |
controllerId virtual inline |
|
void |
dumpPins |
|
void |
statusSend |
|
uint32_t |
minutesUntilNext |
|
void |
atMathsSend |
|
void |
atDataSend |
|
void |
atStatsSend |
|
void |
atCommandSend |
|
void |
atCommsSend |
|
void |
updateMetadata |
|
void |
printMetadata |
|
void |
printMetadataBlock |
|
void |
sdBlockView |
WII5Display
inline
inline WII5Display()
controllerId
virtual inline
virtual inline WII5_CONTROLLERS controllerId()
dumpPins
void dumpPins()
statusSend
void statusSend(const __FlashStringHelper * area, const __FlashStringHelper * out, ...)
minutesUntilNext
uint32_t minutesUntilNext(uint32_t period)
atMathsSend
void atMathsSend(const __FlashStringHelper * area, const __FlashStringHelper * out, ...)
atDataSend
void atDataSend(const __FlashStringHelper * area, const __FlashStringHelper * out, ...)
atStatsSend
void atStatsSend(const __FlashStringHelper * area, const __FlashStringHelper * out, ...)
atCommandSend
void atCommandSend(const __FlashStringHelper * area, const __FlashStringHelper * out, ...)
atCommsSend
void atCommsSend(const __FlashStringHelper * area, const __FlashStringHelper * out, ...)
updateMetadata
void updateMetadata(void * ref)
printMetadata
void printMetadata()
printMetadataBlock
void printMetadataBlock(WII5MetaDataObject * metadata)
sdBlockView
void sdBlockView(uint32_t block, bool view_md, bool view_raw)
Protected Attributes
| Return | Name | Description |
|---|---|---|
WII5MetaDataObject * |
metadata |
metadata
WII5MetaDataObject * metadata
WII5Iridium
#include <WII5Iridium.h>
Inherits:
WII5Power,WII5SerialManager
Driver for the Iridium 9602/9603 SBD modem.
AT-command state machine: power on, wait for the modem to come alive, boot up (ATE1, AT&D0, AT&K0, AT+SBDMTA=0), then drive a sequence of +CSQ / +SBDWB / +SBDIX / +SBDRB cycles to send and receive 340-byte SBD messages. State is in WII5IRIDIUM_STEPS; see step transitions in WII5Iridium.cpp::loop().
Public Attributes
| Return | Name | Description |
|---|---|---|
char |
imei |
|
elapsedMillis |
lastSince |
|
uint8_t |
lastSignalQuality |
|
uint16_t |
lastMOMSN |
|
WII5IRIDIUM_SEND_RESULT |
lastSend |
|
WII5IRIDIUM_RECEIVE_RESULT |
lastReceive |
|
uint16_t |
lastReceiveLen |
|
uint8_t * |
lastReceiveBuff |
imei
char imei
lastSince
elapsedMillis lastSince
lastSignalQuality
uint8_t lastSignalQuality
lastMOMSN
uint16_t lastMOMSN
lastSend
WII5IRIDIUM_SEND_RESULT lastSend
lastReceive
WII5IRIDIUM_RECEIVE_RESULT lastReceive
lastReceiveLen
uint16_t lastReceiveLen
lastReceiveBuff
uint8_t * lastReceiveBuff
Public Methods
| Return | Name | Description |
|---|---|---|
WII5Iridium inline |
||
WII5_CONTROLLERS |
controllerId virtual inline |
Identify the controller category for logging/status. |
WII5_DRIVERS |
driverId virtual inline |
Identify the driver category for logging/status. |
void |
begin |
One-time bring-up. |
void |
loop virtual |
State-machine tick: parses serial, advances steps. |
bool |
requestFirmware |
Queue a firmware-version query (AT+CGMR). |
bool |
requestSendBinary |
Queue a binary send (uses buffer set by setBinary/setBinSize). |
bool |
requestSendText |
Queue a text send (uses buffer set by setText). |
WII5IRIDIUM_REQUEST |
currentRequest |
Currently-queued request type. |
void |
setBinary |
Set the binary buffer + length for the next send. |
void |
setBinSize |
Set just the size of the binary buffer (caller writes the bytes). |
void |
setText |
Set the text payload for the next send (RAM string). |
void |
setText |
Set the text payload for the next send (PROGMEM string). |
void |
start virtual |
Begin a comms cycle (force skips initialized check). |
void |
stop virtual |
Abort the current cycle. |
void |
powerOn virtual |
Apply power to the Iridium modem. |
void |
powerOff virtual |
Cut power to the Iridium modem. |
bool |
waiting |
Are we waiting on the modem to finish a step? |
bool |
isRunning |
Is the state machine currently in a non-idle step? |
void |
sendNewLine virtual |
WII5Iridium
inline
inline WII5Iridium()
controllerId
virtual inline
virtual inline WII5_CONTROLLERS controllerId()
Identify the controller category for logging/status.
driverId
virtual inline
virtual inline WII5_DRIVERS driverId()
Identify the driver category for logging/status.
begin
void begin()
One-time bring-up.
loop
virtual
virtual void loop()
State-machine tick: parses serial, advances steps.
requestFirmware
bool requestFirmware()
Queue a firmware-version query (AT+CGMR).
requestSendBinary
bool requestSendBinary()
Queue a binary send (uses buffer set by setBinary/setBinSize).
requestSendText
bool requestSendText()
Queue a text send (uses buffer set by setText).
currentRequest
WII5IRIDIUM_REQUEST currentRequest()
Currently-queued request type.
setBinary
void setBinary(uint8_t * buf, uint16_t size)
Set the binary buffer + length for the next send.
setBinSize
void setBinSize(uint16_t size)
Set just the size of the binary buffer (caller writes the bytes).
setText
void setText(char * str)
Set the text payload for the next send (RAM string).
setText
void setText(const __FlashStringHelper * str)
Set the text payload for the next send (PROGMEM string).
start
virtual
virtual void start(bool force)
Begin a comms cycle (force skips initialized check).
stop
virtual
virtual void stop(bool force)
Abort the current cycle.
powerOn
virtual
virtual void powerOn(bool force)
Apply power to the Iridium modem.
powerOff
virtual
virtual void powerOff(bool force)
Cut power to the Iridium modem.
waiting
bool waiting()
Are we waiting on the modem to finish a step?
isRunning
bool isRunning()
Is the state machine currently in a non-idle step?
sendNewLine
virtual
virtual void sendNewLine()
Protected Attributes
| Return | Name | Description |
|---|---|---|
bool |
running |
|
WII5IRIDIUM_STEPS |
step |
|
WII5IRIDIUM_STEPS |
stepLast |
|
elapsedMillis |
stepWait |
|
bool |
initialized |
|
WII5IRIDIUM_REQUEST |
currentType |
|
uint8_t |
retry |
|
uint8_t |
sigQualRetry |
|
uint8_t |
sigQualMin |
|
uint32_t |
binSize |
|
uint16_t |
checksum |
|
uint16_t |
loopcount |
|
uint8_t * |
txData |
running
bool running
step
WII5IRIDIUM_STEPS step
stepLast
WII5IRIDIUM_STEPS stepLast
stepWait
elapsedMillis stepWait
initialized
bool initialized
currentType
WII5IRIDIUM_REQUEST currentType
retry
uint8_t retry
sigQualRetry
uint8_t sigQualRetry
sigQualMin
uint8_t sigQualMin
binSize
uint32_t binSize
checksum
uint16_t checksum
loopcount
uint16_t loopcount
txData
uint8_t * txData
Protected Methods
| Return | Name | Description |
|---|---|---|
void |
programLine virtual |
programLine
virtual
virtual void programLine(uint16_t l)
WII5Sparton
#include <WII5Sparton.h>
Inherits:
WII5Power
Driver for the Sparton AHRS-M1 / AHRS-M2 IMU.
Programs the AHRS via NorthTek-style commands over a UART, captures binary records (pose / mag / accel / gyro / cputime) at a configured sample rate, and writes them either straight to SD or via the console passthrough. State machine in WII5SPARTON_STEPS; record layout in WII5_DATA_SpartonBinary.
Public Attributes
| Return | Name | Description |
|---|---|---|
bool |
capture |
|
time_t |
lastStartTime |
|
uint32_t |
lastRunTime |
|
uint32_t |
captureWriteMax |
|
uint32_t |
captureWriteMin |
|
uint32_t |
captureWriteOver |
|
uint32_t |
statsTimeError |
|
uint32_t |
serialSizeError |
capture
bool capture
lastStartTime
time_t lastStartTime
lastRunTime
uint32_t lastRunTime
captureWriteMax
uint32_t captureWriteMax
captureWriteMin
uint32_t captureWriteMin
captureWriteOver
uint32_t captureWriteOver
statsTimeError
uint32_t statsTimeError
serialSizeError
uint32_t serialSizeError
Public Methods
| Return | Name | Description |
|---|---|---|
WII5Sparton inline |
||
WII5_CONTROLLERS |
controllerId virtual inline |
Identify the controller category for logging/status. |
WII5_DRIVERS |
driverId virtual inline |
Identify the driver category for logging/status. |
void |
begin |
One-time bring-up. |
void |
loop |
State-machine tick: parses incoming records, advances steps. |
void |
start virtual |
Begin a programming + capture cycle. |
void |
info |
Query the AHRS for firmware/version info. |
void |
stop |
Abort the current cycle. |
void |
automatic |
Run an automated capture for records samples at hz Hz. |
void |
setBaudrate virtual |
Reconfigure the IMU UART baud rate. |
void |
on |
Apply power to the Sparton. |
void |
off |
Cut power to the Sparton. |
bool |
isRunning |
Is a programming/capture cycle in flight? |
void |
captureRun |
Begin a capture (after programming completes). |
bool |
captureRunning |
Are we currently capturing samples? |
bool |
captureWaiting |
Are we waiting for a capture trigger? |
bool |
captureFinished |
Has the most recent capture completed? |
void |
sendLine |
Send a single NorthTek programming line to the IMU. |
void |
setRawCapture |
Enable/disable raw-record passthrough to the capture file. |
bool |
getRawCapture |
Current raw-capture flag. |
void |
setConsoleDirect |
Enable/disable console-direct output (used when no SD card is present). |
bool |
getConsoleDirect |
Current console-direct flag. |
void |
displaySTATS virtual |
Print capture statistics to the console. |
uint16_t |
getHz |
Current sample rate in Hz. |
uint16_t |
getMs |
Current sample period in milliseconds. |
void |
setHz |
Reconfigure the sample rate (Hz). |
void |
setBinary |
Enable/disable binary record format. |
void |
programLine virtual |
Emit a single NorthTek programming line by index. |
void |
setPassthrough |
Enable/disable raw serial passthrough to the console. |
bool |
getPassthrough |
Current passthrough flag. |
void |
setDebug |
Enable/disable verbose debug output. |
bool |
getDebug |
Current debug flag. |
void |
setCapture |
Enable/disable capture-on-start. |
bool |
getCapture |
Current capture flag. |
void |
setRecords |
Set the number of records to capture. |
uint32_t |
getRecords |
Current record count target. |
void |
repl |
Drop into a NorthTek REPL for interactive configuration. |
void |
resetData |
Reset internal capture buffers and counters. |
WII5Sparton
inline
inline WII5Sparton()
controllerId
virtual inline
virtual inline WII5_CONTROLLERS controllerId()
Identify the controller category for logging/status.
driverId
virtual inline
virtual inline WII5_DRIVERS driverId()
Identify the driver category for logging/status.
begin
void begin()
One-time bring-up.
loop
void loop()
State-machine tick: parses incoming records, advances steps.
start
virtual
virtual void start()
Begin a programming + capture cycle.
info
void info()
Query the AHRS for firmware/version info.
stop
void stop(bool force)
Abort the current cycle.
automatic
void automatic(uint8_t hz, uint32_t records, bool capture)
Run an automated capture for records samples at hz Hz.
setBaudrate
virtual
virtual void setBaudrate(uint32_t baud)
Reconfigure the IMU UART baud rate.
on
void on(bool forced)
Apply power to the Sparton.
off
void off(bool forced)
Cut power to the Sparton.
isRunning
bool isRunning()
Is a programming/capture cycle in flight?
captureRun
void captureRun()
Begin a capture (after programming completes).
captureRunning
bool captureRunning()
Are we currently capturing samples?
captureWaiting
bool captureWaiting()
Are we waiting for a capture trigger?
captureFinished
bool captureFinished()
Has the most recent capture completed?
sendLine
void sendLine(uint16_t l)
Send a single NorthTek programming line to the IMU.
setRawCapture
void setRawCapture(bool in)
Enable/disable raw-record passthrough to the capture file.
getRawCapture
bool getRawCapture()
Current raw-capture flag.
setConsoleDirect
void setConsoleDirect(bool in)
Enable/disable console-direct output (used when no SD card is present).
getConsoleDirect
bool getConsoleDirect()
Current console-direct flag.
displaySTATS
virtual
virtual void displaySTATS()
Print capture statistics to the console.
getHz
uint16_t getHz()
Current sample rate in Hz.
getMs
uint16_t getMs()
Current sample period in milliseconds.
setHz
void setHz(uint16_t h)
Reconfigure the sample rate (Hz).
setBinary
void setBinary(bool in)
Enable/disable binary record format.
programLine
virtual
virtual void programLine(uint16_t l)
Emit a single NorthTek programming line by index.
setPassthrough
void setPassthrough(bool in)
Enable/disable raw serial passthrough to the console.
getPassthrough
bool getPassthrough()
Current passthrough flag.
setDebug
void setDebug(bool in)
Enable/disable verbose debug output.
getDebug
bool getDebug()
Current debug flag.
setCapture
void setCapture(bool in)
Enable/disable capture-on-start.
getCapture
bool getCapture()
Current capture flag.
setRecords
void setRecords(uint32_t in)
Set the number of records to capture.
getRecords
uint32_t getRecords()
Current record count target.
repl
void repl()
Drop into a NorthTek REPL for interactive configuration.
resetData
void resetData()
Reset internal capture buffers and counters.
Protected Attributes
| Return | Name | Description |
|---|---|---|
bool |
running |
|
bool |
cancel |
|
bool |
rawCapture |
|
bool |
consoleDirect |
|
uint16_t |
HZ |
|
bool |
binMode |
|
bool |
debug |
|
uint32_t |
recordTotal |
|
elapsedMillis |
elapsedRequest |
|
uint32_t |
sendCount |
|
uint16_t |
programStart |
|
uint16_t |
programEnd |
|
WII5SPARTON_STEPS |
step |
|
WII5SPARTON_STEPS |
stepLast |
|
elapsedMillis |
stepWait |
|
uint32_t |
recordCount |
|
uint8_t |
lastValidRecord |
|
WII5_DATA_SpartonBinary |
binRecords |
|
uint8_t |
currentRecord |
|
uint8_t |
currentCount |
|
bool |
binEscape |
|
uint8_t |
processMode |
|
elapsedMillis |
startCapture |
|
elapsedMillis |
startWhen |
|
elapsedMillis |
lastWrite |
|
uint32_t |
blockNext |
|
elapsedMillis |
captureWriteTime |
|
time_t |
timeStart |
|
time_t |
timeEnd |
running
bool running
cancel
bool cancel
rawCapture
bool rawCapture
consoleDirect
bool consoleDirect
HZ
uint16_t HZ
binMode
bool binMode
debug
bool debug
recordTotal
uint32_t recordTotal
elapsedRequest
elapsedMillis elapsedRequest
sendCount
uint32_t sendCount
programStart
uint16_t programStart
programEnd
uint16_t programEnd
step
WII5SPARTON_STEPS step
stepLast
WII5SPARTON_STEPS stepLast
stepWait
elapsedMillis stepWait
recordCount
uint32_t recordCount
lastValidRecord
uint8_t lastValidRecord
binRecords
WII5_DATA_SpartonBinary binRecords
currentRecord
uint8_t currentRecord
currentCount
uint8_t currentCount
binEscape
bool binEscape
processMode
uint8_t processMode
startCapture
elapsedMillis startCapture
startWhen
elapsedMillis startWhen
lastWrite
elapsedMillis lastWrite
blockNext
uint32_t blockNext
captureWriteTime
elapsedMillis captureWriteTime
timeStart
time_t timeStart
timeEnd
time_t timeEnd
Protected Methods
| Return | Name | Description |
|---|---|---|
void |
handleRxChar |
handleRxChar
void handleRxChar(uint8_t c)
WII5Strings
#include <WII5Strings.h>
Public Methods
| Return | Name | Description |
|---|---|---|
WII5Strings inline |
||
WII5_CONTROLLERS |
controllerId virtual inline |
|
WII5_COMMANDS |
parseCommand |
|
WII5_DEVICES |
parseDevice |
|
WII5_DRIVERS |
parseDriver |
|
WII5_PORTS |
parsePort |
|
WII5GPS_MODES |
parseGPSMode |
|
WII5_SWITCH |
parseSwitch |
|
WII5_MODES |
parseMode |
|
char * |
strCommand |
|
char * |
strDevice |
|
char * |
strDriver |
|
char * |
strPort |
|
char * |
strStatus |
|
char * |
strError |
|
char * |
strSwitch |
|
char * |
strGPSMode |
|
char * |
strPinMode |
|
char * |
strState |
|
char * |
strMode |
|
char * |
strPinArduinoName |
|
char * |
strPinWII5Name |
|
char * |
strSelfTestStatus |
|
char * |
strSelfTestStatusLong |
|
char * |
strSelfTestDevice |
WII5Strings
inline
inline WII5Strings()
controllerId
virtual inline
virtual inline WII5_CONTROLLERS controllerId()
parseCommand
WII5_COMMANDS parseCommand(char * in1, char * in2, char * in3)
parseDevice
WII5_DEVICES parseDevice(char * in)
parseDriver
WII5_DRIVERS parseDriver(char * in)
parsePort
WII5_PORTS parsePort(char * in)
parseGPSMode
WII5GPS_MODES parseGPSMode(char * in)
parseSwitch
WII5_SWITCH parseSwitch(char * in)
parseMode
WII5_MODES parseMode(char * in)
strCommand
char * strCommand(WII5_COMMANDS c)
strDevice
char * strDevice(WII5_DEVICES d)
strDriver
char * strDriver(WII5_DRIVERS d)
strPort
char * strPort(WII5_PORTS p)
strStatus
char * strStatus(WII5_STATUS s)
strError
char * strError(WII5_ERRORS e)
strSwitch
char * strSwitch(WII5_SWITCH s)
strGPSMode
char * strGPSMode(WII5GPS_MODES m)
strPinMode
char * strPinMode(uint8_t p)
strState
char * strState(uint8_t p)
strMode
char * strMode(WII5_MODES p)
strPinArduinoName
char * strPinArduinoName(uint8_t p)
strPinWII5Name
char * strPinWII5Name(uint8_t p)
strSelfTestStatus
char * strSelfTestStatus(WII5SELFTEST_STATUS in)
strSelfTestStatusLong
char * strSelfTestStatusLong(WII5SELFTEST_STATUS in)
strSelfTestDevice
char * strSelfTestDevice(WII5SELFTEST_DEVICES in)
Protected Methods
| Return | Name | Description |
|---|---|---|
void |
setBufferUnknown |
setBufferUnknown
void setBufferUnknown()
WII5Commands
#include <WII5Commands.h>
Inherits:
WII5
Text-protocol command parser and dispatcher.
Accepts commands from multiple inputs (local console, Iridium SBD, radio, buttons) in two syntaxes:
-
"@AREA,cmd,arg1,arg2,..." (the AT-style protocol)
-
"X;" single-letter "standard" style (used in manual test mode)
Records the most recent command in lastCommand* members so result and acknowledge replies can refer back to it.
Public Attributes
| Return | Name | Description |
|---|---|---|
elapsedMillis |
disableButtons |
|
elapsedMillis |
lastCommandAge |
|
time_t |
lastCommandT |
|
WII5_PORTS |
lastCommandPort |
|
WII5_DEVICES |
lastCommandDevice |
|
WII5_AREAS |
lastCommandArea |
|
WII5_COMMANDS |
lastCommandCmd |
|
uint32_t |
lastCommandParam1 |
|
uint32_t |
lastCommandParam2 |
|
uint32_t |
lastCommandParam3 |
|
WII5_RESULTS |
lastCommandResult |
|
char |
lastCommandMessage |
|
bool |
lastCommandAckComplete |
disableButtons
elapsedMillis disableButtons
lastCommandAge
elapsedMillis lastCommandAge
lastCommandT
time_t lastCommandT
lastCommandPort
WII5_PORTS lastCommandPort
lastCommandDevice
WII5_DEVICES lastCommandDevice
lastCommandArea
WII5_AREAS lastCommandArea
lastCommandCmd
WII5_COMMANDS lastCommandCmd
lastCommandParam1
uint32_t lastCommandParam1
lastCommandParam2
uint32_t lastCommandParam2
lastCommandParam3
uint32_t lastCommandParam3
lastCommandResult
WII5_RESULTS lastCommandResult
lastCommandMessage
char lastCommandMessage
lastCommandAckComplete
bool lastCommandAckComplete
Public Methods
| Return | Name | Description |
|---|---|---|
WII5_CONTROLLERS |
controllerId virtual inline |
Identify the controller category for logging/status. |
void |
begin |
One-time bring-up. |
bool |
injectCommand |
Feed an AT-style command into the command pipeline as if it came from the console. |
bool |
processConsoleStandard |
Drain pending "X;" single-letter commands from the console. |
bool |
processConsoleAT |
Drain pending "@AREA,cmd,..." AT-style commands from the console. |
bool |
processButtons |
Translate physical button events (click/long-hold) into commands. |
bool |
processNetwork |
Drain pending packets from the LoRa network (if enabled). |
bool |
processBinData |
Process any incoming BinData payload (typically from Iridium). |
bool |
runCommand |
Execute a parsed command; returns true on success. |
void |
setupLast |
Record the source/area of the command currently being processed. |
void |
doneLast |
Finalize lastCommand bookkeeping (call after runCommand). |
void |
resultLast |
Set the result + message for the last command (mutable buffer). |
void |
resultLast |
Set the result + message for the last command (PROGMEM string). |
void |
resultLast |
Set the result for the last command without altering the message. |
void |
dump |
Print a debug dump of command state to the console. |
controllerId
virtual inline
virtual inline WII5_CONTROLLERS controllerId()
Identify the controller category for logging/status.
begin
void begin()
One-time bring-up.
injectCommand
bool injectCommand(char * sendCmd)
Feed an AT-style command into the command pipeline as if it came from the console.
processConsoleStandard
bool processConsoleStandard()
Drain pending "X;" single-letter commands from the console.
processConsoleAT
bool processConsoleAT()
Drain pending "@AREA,cmd,..." AT-style commands from the console.
processButtons
bool processButtons()
Translate physical button events (click/long-hold) into commands.
processNetwork
bool processNetwork()
Drain pending packets from the LoRa network (if enabled).
processBinData
bool processBinData()
Process any incoming BinData payload (typically from Iridium).
runCommand
bool runCommand(WII5_COMMANDS cmd, char ** params, uint8_t paramsLen)
Execute a parsed command; returns true on success.
setupLast
void setupLast(WII5_DEVICES device, WII5_PORTS port, WII5_AREAS area, WII5_COMMANDS cmd)
Record the source/area of the command currently being processed.
doneLast
void doneLast()
Finalize lastCommand bookkeeping (call after runCommand).
resultLast
void resultLast(WII5_RESULTS result, char * message)
Set the result + message for the last command (mutable buffer).
resultLast
void resultLast(WII5_RESULTS result, const __FlashStringHelper * area)
Set the result + message for the last command (PROGMEM string).
resultLast
void resultLast(WII5_RESULTS result)
Set the result for the last command without altering the message.
dump
void dump()
Print a debug dump of command state to the console.
Protected Attributes
| Return | Name | Description |
|---|---|---|
elapsedMillis |
delayWait |
|
time_t |
when |
|
elapsedMillis |
buttonHeld |
|
elapsedMillis |
buttonReleaseWait |
|
bool |
buttonActive |
|
bool |
buttonReleased |
|
uint8_t |
buttonMode |
delayWait
elapsedMillis delayWait
when
time_t when
buttonHeld
elapsedMillis buttonHeld
buttonReleaseWait
elapsedMillis buttonReleaseWait
buttonActive
bool buttonActive
buttonReleased
bool buttonReleased
buttonMode
uint8_t buttonMode
WII5Sh3dUtil
#include <WII5Sh3dUtil.h>
Public Attributes
| Return | Name | Description |
|---|---|---|
uint32_t |
sleepLastSeconds |
|
uint8_t |
sleepLastReason |
|
time_t |
sleepLastTime |
sleepLastSeconds
uint32_t sleepLastSeconds
sleepLastReason
uint8_t sleepLastReason
sleepLastTime
time_t sleepLastTime
Public Methods
| Return | Name | Description |
|---|---|---|
void |
begin |
|
void |
loop |
|
void |
reset |
|
uint8_t |
sleep |
begin
void begin()
loop
void loop()
reset
void reset()
sleep
uint8_t sleep(uint32_t seconds)
WII5ModeSleep
#include <WII5ModeSleep.h>
Inherits:
WII5Mode
Sleep mode: long sleeps between wake-ups.
Computes how long to sleep until the next configured wake-up (capture window, position update, etc.), powers down the Maths CPU and other peripherals, and uses sh3dNodeUtil.sleep() to put the AVR into deep sleep.
Public Methods
| Return | Name | Description |
|---|---|---|
WII5ModeSleep inline |
||
void |
reset |
Reset to WII5SLEEP_START. |
void |
begin virtual |
One-time bring-up. |
void |
loop virtual |
State-machine tick. |
WII5ModeSleep
inline
inline WII5ModeSleep()
reset
void reset()
Reset to WII5SLEEP_START.
begin
virtual
virtual void begin()
One-time bring-up.
loop
virtual
virtual void loop()
State-machine tick.
Protected Attributes
| Return | Name | Description |
|---|---|---|
bool |
first |
|
WII5SLEEP_STEPS |
lastStep |
|
elapsedMillis |
stepWait |
|
elapsedMillis |
displayWait |
|
WII5SLEEP_STEPS |
step |
|
uint32_t |
sleepNextSeconds |
first
bool first
lastStep
WII5SLEEP_STEPS lastStep
stepWait
elapsedMillis stepWait
displayWait
elapsedMillis displayWait
step
WII5SLEEP_STEPS step
sleepNextSeconds
uint32_t sleepNextSeconds
WII5Controller
#include <WII5Controller.h>
Inherits:
WII5
Top-level firmware controller.
Owns the main loop(), watchdog tick, and dispatch to the active mode (Capture / Sleep / Position / ManualTest / SelfTest / LowBattery). Also tracks SD-card hand-off, the shared 5V rail, and "last hello" state used by mode transitions.
Public Attributes
| Return | Name | Description |
|---|---|---|
WII5ModeSleep * |
modeSleep |
|
WII5ModeCapture * |
modeCapture |
|
WII5ModeLowBattery * |
modeLowBattery |
|
WII5ModeManualTest * |
modeManualTest |
|
WII5ModePosition * |
modePosition |
|
WII5ModeSelfTest * |
modeSelfTest |
|
time_t |
lastHelloReceived |
|
WII5_PORTS |
lastHelloPort |
|
WII5_DEVICES |
lastHelloDevice |
|
elapsedMillis |
lastHelloElapsed |
|
bool |
tempDisableWDT |
|
uint32_t |
uptime |
modeSleep
WII5ModeSleep * modeSleep
modeCapture
WII5ModeCapture * modeCapture
modeLowBattery
WII5ModeLowBattery * modeLowBattery
modeManualTest
WII5ModeManualTest * modeManualTest
modePosition
WII5ModePosition * modePosition
modeSelfTest
WII5ModeSelfTest * modeSelfTest
lastHelloReceived
time_t lastHelloReceived
lastHelloPort
WII5_PORTS lastHelloPort
lastHelloDevice
WII5_DEVICES lastHelloDevice
lastHelloElapsed
elapsedMillis lastHelloElapsed
tempDisableWDT
bool tempDisableWDT
uptime
uint32_t uptime
Public Methods
| Return | Name | Description |
|---|---|---|
WII5_CONTROLLERS |
controllerId virtual inline |
Identify the controller category for logging/status. |
void |
begin |
One-time bring-up: zero counters, call mode-class begin()s, enable WDT. |
void |
safeDelay |
Spin in loopSafe() / loopWDT() for waits milliseconds. |
WII5_MODES |
getMode |
Current run-time mode. |
bool |
setMode |
Switch mode; returns false if the transition was rejected. |
void |
setDefaultMode |
Reset to the EEPROM-configured default mode. |
void |
setCurrentMode |
Move to whatever calculateCurrentMode() returns right now. |
WII5_MODES |
calculateCurrentMode |
Compute the mode the buoy should be in given clock + battery + temp overrides. |
WII5_MODES |
calculateDefaultMode |
Compute the persistent default mode from EEPROM configuration. |
void |
setSDOff |
Disable both SD-card chip selects. |
void |
setSD1 |
Hand SD card 1 to the AVR side. |
void |
setSD2 |
Hand SD card 2 to the AVR side. |
uint8_t |
getSD |
Which SD card is currently selected (0/1/2). |
void |
shared5On |
Enable the shared 5V rail (used by GPS, Iridium, Sparton, etc.). |
void |
shared5Off |
Disable the shared 5V rail. |
void |
setLastHello |
Record that a peer device replied to a Hello. |
bool |
checkLastHello |
Has device d been heard from within the last msOld ms? |
void |
loop |
Main tick: runs WDT, the safe loop, and dispatches the active mode. |
void |
loopSafe |
Minimal-cost loop: console, buttons, Iridium, Communications. |
void |
loopOther |
Heavier-cost loop: Sparton, GPS, Battery, Weather, etc. |
void |
loopWDT |
Pet the watchdog (external pin and/or AVR internal WDT). |
void |
dump |
Print a one-line summary of controller state to the console. |
void |
statusDump |
Print the long-form @Status block to the console (human=true for human-readable). |
void |
disableChipSelect |
Tri-state both SD chip-select lines. |
controllerId
virtual inline
virtual inline WII5_CONTROLLERS controllerId()
Identify the controller category for logging/status.
begin
void begin()
One-time bring-up: zero counters, call mode-class begin()s, enable WDT.
safeDelay
void safeDelay(uint32_t waits)
Spin in loopSafe() / loopWDT() for waits milliseconds.
getMode
WII5_MODES getMode()
Current run-time mode.
setMode
bool setMode(WII5_MODES newMode, bool nodelay)
Switch mode; returns false if the transition was rejected.
setDefaultMode
void setDefaultMode()
Reset to the EEPROM-configured default mode.
setCurrentMode
void setCurrentMode()
Move to whatever calculateCurrentMode() returns right now.
calculateCurrentMode
WII5_MODES calculateCurrentMode()
Compute the mode the buoy should be in given clock + battery + temp overrides.
calculateDefaultMode
WII5_MODES calculateDefaultMode()
Compute the persistent default mode from EEPROM configuration.
setSDOff
void setSDOff()
Disable both SD-card chip selects.
setSD1
void setSD1()
Hand SD card 1 to the AVR side.
setSD2
void setSD2()
Hand SD card 2 to the AVR side.
getSD
uint8_t getSD()
Which SD card is currently selected (0/1/2).
shared5On
void shared5On()
Enable the shared 5V rail (used by GPS, Iridium, Sparton, etc.).
shared5Off
void shared5Off()
Disable the shared 5V rail.
setLastHello
void setLastHello(WII5_PORTS p, WII5_DEVICES d)
Record that a peer device replied to a Hello.
checkLastHello
bool checkLastHello(WII5_DEVICES d, uint32_t msOld)
Has device d been heard from within the last msOld ms?
loop
void loop()
Main tick: runs WDT, the safe loop, and dispatches the active mode.
loopSafe
void loopSafe()
Minimal-cost loop: console, buttons, Iridium, Communications.
loopOther
void loopOther()
Heavier-cost loop: Sparton, GPS, Battery, Weather, etc.
loopWDT
void loopWDT()
Pet the watchdog (external pin and/or AVR internal WDT).
dump
void dump()
Print a one-line summary of controller state to the console.
statusDump
void statusDump(bool human)
Print the long-form @Status block to the console (human=true for human-readable).
disableChipSelect
void disableChipSelect()
Tri-state both SD chip-select lines.
Protected Attributes
| Return | Name | Description |
|---|---|---|
uint8_t |
currentSD |
|
uint32_t |
next |
|
uint16_t |
size |
|
uint32_t |
period |
|
elapsedMillis |
minuteWait |
|
elapsedMillis |
delayWait |
|
elapsedMillis |
wdtWait |
|
elapsedMillis |
modeWait |
|
WII5_MODES |
mode |
|
WII5_MODES |
lastMode |
|
time_t |
modeUntil |
currentSD
uint8_t currentSD
next
uint32_t next
size
uint16_t size
period
uint32_t period
minuteWait
elapsedMillis minuteWait
delayWait
elapsedMillis delayWait
wdtWait
elapsedMillis wdtWait
modeWait
elapsedMillis modeWait
mode
WII5_MODES mode
lastMode
WII5_MODES lastMode
modeUntil
time_t modeUntil
WII5Sh3dConfig
#include <WII5Sh3dConfig.h>
Public Attributes
| Return | Name | Description |
|---|---|---|
bool |
initialized |
initialized
bool initialized = false
Public Methods
| Return | Name | Description |
|---|---|---|
void |
begin |
|
void |
readConfig |
|
void |
updateConfig |
|
SH3D_TYPE_UNIQUEID |
getNodeId |
|
SH3D_TYPE_UNIQUEID |
setNodeId |
|
SH3D_TYPE_COUNTER |
getRunCount |
|
SH3D_TYPE_COUNTER |
updateRunCount |
|
SH3D_TYPE_COUNTER |
clearRunCount |
|
SH3D_TYPE_COUNTER |
getRecordCount |
|
SH3D_TYPE_COUNTER |
updateRecordCount |
|
SH3D_TYPE_COUNTER |
clearRecordCount |
|
SH3D_TYPE_COUNTER |
getStorageLogLast |
|
SH3D_TYPE_COUNTER |
updateStorageLogLast |
|
SH3D_TYPE_COUNTER |
clearStorageLogLast |
|
SH3D_TYPE_COUNTER |
getStorageSensorLast |
|
SH3D_TYPE_COUNTER |
updateStorageSensorLast |
|
SH3D_TYPE_COUNTER |
clearStorageSensorLast |
|
uint16_t |
sizeExtra |
|
uint16_t |
startExtra |
|
void |
readExtra |
|
void |
updateExtra |
|
bool |
getFlashErased |
|
bool |
setFlashErased |
begin
void begin()
readConfig
void readConfig()
updateConfig
void updateConfig()
getNodeId
SH3D_TYPE_UNIQUEID getNodeId()
setNodeId
SH3D_TYPE_UNIQUEID setNodeId(SH3D_TYPE_UNIQUEID newId)
getRunCount
SH3D_TYPE_COUNTER getRunCount()
updateRunCount
SH3D_TYPE_COUNTER updateRunCount()
clearRunCount
SH3D_TYPE_COUNTER clearRunCount(SH3D_TYPE_COUNTER setId)
getRecordCount
SH3D_TYPE_COUNTER getRecordCount()
updateRecordCount
SH3D_TYPE_COUNTER updateRecordCount()
clearRecordCount
SH3D_TYPE_COUNTER clearRecordCount(SH3D_TYPE_COUNTER setId)
getStorageLogLast
SH3D_TYPE_COUNTER getStorageLogLast()
updateStorageLogLast
SH3D_TYPE_COUNTER updateStorageLogLast()
clearStorageLogLast
SH3D_TYPE_COUNTER clearStorageLogLast(SH3D_TYPE_COUNTER setId)
getStorageSensorLast
SH3D_TYPE_COUNTER getStorageSensorLast()
updateStorageSensorLast
SH3D_TYPE_COUNTER updateStorageSensorLast()
clearStorageSensorLast
SH3D_TYPE_COUNTER clearStorageSensorLast(SH3D_TYPE_COUNTER setId)
sizeExtra
uint16_t sizeExtra()
startExtra
uint16_t startExtra()
readExtra
void readExtra(char * data, uint16_t len, uint16_t offset)
updateExtra
void updateExtra(char * data, uint16_t len, uint16_t offset)
getFlashErased
bool getFlashErased()
setFlashErased
bool setFlashErased(bool in)
Protected Attributes
| Return | Name | Description |
|---|---|---|
typeConfig |
dataConfig |
dataConfig
typeConfig dataConfig
WII5ModeCapture
#include <WII5ModeCapture.h>
Inherits:
WII5Mode
Capture mode: time-driven IMU data capture and SD logging.
Drives the WII5CAPTURE_STEPS state machine: prepare SD + comms + IMU, wait for the start time, run the capture, write metadata and processed-results blocks, optionally flip SD cards, then idle until the next capture window.
Public Attributes
| Return | Name | Description |
|---|---|---|
bool |
enableAtFile |
|
bool |
enableGPS |
|
bool |
enableMaths |
|
bool |
enableComms |
|
bool |
enableLiveSwap |
|
uint32_t |
startTime |
enableAtFile
bool enableAtFile
enableGPS
bool enableGPS
enableMaths
bool enableMaths
enableComms
bool enableComms
enableLiveSwap
bool enableLiveSwap
startTime
uint32_t startTime
Public Methods
| Return | Name | Description |
|---|---|---|
WII5ModeCapture inline |
||
void |
reset |
Reset to WII5CAPTURE_START. |
void |
begin virtual |
One-time bring-up. |
void |
loop virtual |
State-machine tick. |
void |
start |
Begin a manual capture. |
void |
stop |
Abort the current capture. |
void |
flip |
Switch the active SD card to the alternate one. |
WII5ModeCapture
inline
inline WII5ModeCapture()
reset
void reset()
Reset to WII5CAPTURE_START.
begin
virtual
virtual void begin()
One-time bring-up.
loop
virtual
virtual void loop()
State-machine tick.
start
void start(bool force)
Begin a manual capture.
stop
void stop(bool force)
Abort the current capture.
flip
void flip()
Switch the active SD card to the alternate one.
Protected Attributes
| Return | Name | Description |
|---|---|---|
elapsedMillis |
wait |
|
time_t |
captureStart |
|
WII5CAPTURE_TYPE |
captureType |
|
WII5CAPTURE_STEPS |
step |
|
WII5CAPTURE_STEPS |
stepLast |
|
uint32_t |
stepCount |
|
uint32_t |
stepTotal |
|
uint8_t |
retry |
|
uint32_t |
minutes |
|
uint32_t |
period |
|
uint32_t |
remaining |
|
bool |
debug |
wait
elapsedMillis wait
captureStart
time_t captureStart
captureType
WII5CAPTURE_TYPE captureType
step
WII5CAPTURE_STEPS step
stepLast
WII5CAPTURE_STEPS stepLast
stepCount
uint32_t stepCount
stepTotal
uint32_t stepTotal
retry
uint8_t retry
minutes
uint32_t minutes
period
uint32_t period
remaining
uint32_t remaining
debug
bool debug
WII5Sh3dConsole
#include <WII5Sh3dConsole.h>
Console abstraction over multiple Stream objects.
Routes formatted output (printf, log) and parses incoming command frames across one or more Stream sources. Recognises three frame syntaxes:
-
NMEA ($-prefixed, CRC-checked)
-
CSV (-prefixed, comma-separated)
-
Binary (!-prefixed, length+CRC framed)
Most code in this firmware logs through console rather than calling Serial.print directly so that output goes wherever the board is configured for.
Public Attributes
| Return | Name | Description |
|---|---|---|
char * |
printBuffer |
|
uint16_t |
bufferMax |
printBuffer
char * printBuffer
bufferMax
uint16_t bufferMax
Public Methods
| Return | Name | Description |
|---|---|---|
void |
begin |
One-time bring-up. |
void |
begin |
One-time bring-up using caller-supplied buffers. |
bool |
add |
Add a Stream source to the console (typically a Serial port). |
bool |
remove |
Remove a previously-added Stream. |
bool |
enableBinary |
Enable Binary frame parsing (caller must provide a buffer). |
bool |
disableBinary |
Disable Binary frame parsing. |
void |
setBinaryBuffer |
Set the buffer used to receive Binary frames. |
void |
clearCommand |
Discard any in-flight command. |
void |
clearCallback |
Remove the registered logging callback. |
void |
setCallbackFunction |
Register a callback invoked on log output. |
void |
setCallbackStorage |
Use the default storage-callback (writes to the SD log). |
void |
setCallbackLevel |
Only invoke the callback for messages at this level or above. |
uint8_t |
getCallbackLevel |
Current callback log-level threshold. |
void |
doCallback |
Manually fire the callback for a given level. |
void |
setLevel |
Set the console log-level threshold. |
int8_t |
getLevel inline |
Current console log-level threshold. |
void |
loop |
Tick: read from streams, parse frames, run timeouts. |
void |
flush |
Flush all output streams. |
bool |
available |
True once a complete command frame has been received. |
byte |
getCommand inline |
First byte of the most recent "X;" standard-style command. |
uint32_t |
getVal inline |
Numeric argument from the most recent "X;" command. |
char * |
getBuffer inline |
Raw command-buffer pointer. |
void |
processCmd |
Feed a byte into the standard-style command parser. |
void |
processCsv |
Finalize parsing of a CSV (-prefixed) command frame. |
uint8_t |
getCsvCount inline |
Number of CSV fields parsed in the current frame. |
uint32_t |
getCsvVal inline |
CSV field n interpreted as uint32. |
char * |
getCsvBuffer inline |
CSV field n as the original string. |
void |
setDateTime inline |
Enable date-time prefix on log output. |
void |
clearDateTime inline |
Disable date-time prefix on log output. |
void |
printDateTime |
Print a formatted date-time prefix (current time if t==0). |
void |
print |
Print a string to all output streams. |
void |
sprintf |
printf to a single stream rather than all of them. |
void |
printf |
printf to all output streams (RAM format string). |
void |
printf |
printf to all output streams (PROGMEM format string). |
void |
printPrefix |
Emit the level-prefix string ("# INFO: " etc) for a level. |
void |
log |
Log a message at level l (RAM format string). |
void |
log |
Log a message at level l (PROGMEM format string). |
void |
safeLog |
|
void |
safeLog |
|
void |
nmeaSend |
|
void |
nmeaCRCSend |
|
void |
printNewLine |
|
bool |
availableBin inline |
|
char * |
getBinBuffer inline |
|
uint16_t |
getBinLength inline |
|
void |
printBinary |
|
void |
printBits |
|
WII5Sh3dConsole inline |
||
void |
setEcho |
|
bool |
getEcho |
begin
void begin(uint16_t bufSize, uint16_t cmdSize)
One-time bring-up.
Allocates internal print + command buffers.
begin
void begin(char * buf, uint16_t bufSize, char * cmdBuf, uint16_t cmdSize)
One-time bring-up using caller-supplied buffers.
add
bool add(Stream * s, uint8_t direction)
Add a Stream source to the console (typically a Serial port).
remove
bool remove(Stream * s)
Remove a previously-added Stream.
enableBinary
bool enableBinary()
Enable Binary frame parsing (caller must provide a buffer).
disableBinary
bool disableBinary()
Disable Binary frame parsing.
setBinaryBuffer
void setBinaryBuffer(char * buf, uint16_t len)
Set the buffer used to receive Binary frames.
clearCommand
void clearCommand()
Discard any in-flight command.
clearCallback
void clearCallback()
Remove the registered logging callback.
setCallbackFunction
void setCallbackFunction(CallbackFunction f)
Register a callback invoked on log output.
setCallbackStorage
void setCallbackStorage()
Use the default storage-callback (writes to the SD log).
setCallbackLevel
void setCallbackLevel(uint8_t l)
Only invoke the callback for messages at this level or above.
getCallbackLevel
uint8_t getCallbackLevel()
Current callback log-level threshold.
doCallback
void doCallback(uint8_t l)
Manually fire the callback for a given level.
setLevel
void setLevel(uint8_t in)
Set the console log-level threshold.
getLevel
inline
inline int8_t getLevel()
Current console log-level threshold.
loop
void loop()
Tick: read from streams, parse frames, run timeouts.
flush
void flush()
Flush all output streams.
available
bool available()
True once a complete command frame has been received.
getCommand
inline
inline byte getCommand()
First byte of the most recent "X;" standard-style command.
getVal
inline
inline uint32_t getVal()
Numeric argument from the most recent "X;" command.
getBuffer
inline
inline char * getBuffer()
Raw command-buffer pointer.
processCmd
void processCmd(char in)
Feed a byte into the standard-style command parser.
processCsv
void processCsv()
Finalize parsing of a CSV (-prefixed) command frame.
getCsvCount
inline
inline uint8_t getCsvCount()
Number of CSV fields parsed in the current frame.
getCsvVal
inline
inline uint32_t getCsvVal(uint8_t n)
CSV field n interpreted as uint32.
getCsvBuffer
inline
inline char * getCsvBuffer(uint8_t n)
CSV field n as the original string.
setDateTime
inline
inline void setDateTime()
Enable date-time prefix on log output.
clearDateTime
inline
inline void clearDateTime()
Disable date-time prefix on log output.
printDateTime
void printDateTime(uint32_t t)
Print a formatted date-time prefix (current time if t==0).
void print(char * out)
Print a string to all output streams.
sprintf
void sprintf(Stream * s, const __FlashStringHelper * out, ...)
printf to a single stream rather than all of them.
printf
void printf(char * out, ...)
printf to all output streams (RAM format string).
printf
void printf(const __FlashStringHelper * out, ...)
printf to all output streams (PROGMEM format string).
printPrefix
void printPrefix(uint8_t level)
Emit the level-prefix string ("# INFO: " etc) for a level.
log
void log(uint8_t l, char * out, ...)
Log a message at level l (RAM format string).
log
void log(uint8_t l, const __FlashStringHelper * out, ...)
Log a message at level l (PROGMEM format string).
safeLog
void safeLog(uint8_t l, char * out, ...)
safeLog
void safeLog(uint8_t l, const __FlashStringHelper * out, ...)
nmeaSend
void nmeaSend(const __FlashStringHelper * out, ...)
nmeaCRCSend
void nmeaCRCSend()
printNewLine
void printNewLine()
availableBin
inline
inline bool availableBin()
getBinBuffer
inline
inline char * getBinBuffer()
getBinLength
inline
inline uint16_t getBinLength()
printBinary
void printBinary(char * buf, uint16_t len)
printBits
void printBits(void * buf, uint16_t len)
WII5Sh3dConsole
inline
inline WII5Sh3dConsole()
setEcho
void setEcho(bool in)
getEcho
bool getEcho()
Protected Attributes
| Return | Name | Description |
|---|---|---|
bool |
echo |
|
elapsedMillis |
waitInput |
|
CallbackFunction |
callback |
|
int8_t |
callback_level |
|
bool |
callback_default |
|
Stream * |
streams |
|
uint8_t |
streamsDirection |
|
uint8_t |
streamCount |
|
int8_t |
level |
|
bool |
displayDateTime |
|
uint8_t |
cmdType |
|
uint8_t |
cmdCount |
|
byte |
cmd |
|
uint32_t |
val |
|
char * |
cmdBuffer |
|
char * |
csv_str |
|
uint32_t |
csv_uint32 |
|
uint8_t |
csv_count |
|
uint8_t |
csv_last |
|
bool |
binAvailable |
|
char * |
binBuffer |
|
uint16_t |
binMax |
|
bool |
binEnable |
|
uint16_t |
binReceiveCount |
|
uint16_t |
binReceiveExpect |
|
uint16_t |
binReceiveCRC |
|
uint16_t |
consoleMax |
|
uint16_t |
i |
echo
bool echo
waitInput
elapsedMillis waitInput
callback
CallbackFunction callback
callback_level
int8_t callback_level
callback_default
bool callback_default
streams
Stream * streams
streamsDirection
uint8_t streamsDirection
streamCount
uint8_t streamCount = 0
level
int8_t level
displayDateTime
bool displayDateTime
cmdType
uint8_t cmdType
cmdCount
uint8_t cmdCount
cmd
byte cmd
val
uint32_t val
cmdBuffer
char * cmdBuffer
csv_str
char * csv_str
csv_uint32
uint32_t csv_uint32
csv_count
uint8_t csv_count
csv_last
uint8_t csv_last
binAvailable
bool binAvailable
binBuffer
char * binBuffer
binMax
uint16_t binMax
binEnable
bool binEnable
binReceiveCount
uint16_t binReceiveCount
binReceiveExpect
uint16_t binReceiveExpect
binReceiveCRC
uint16_t binReceiveCRC
consoleMax
uint16_t consoleMax
i
uint16_t i
Protected Methods
| Return | Name | Description |
|---|---|---|
void |
internalErrorNotEnoughMemory |
|
void |
internalErrorNoBufferStream |
|
bool |
check |
internalErrorNotEnoughMemory
void internalErrorNotEnoughMemory()
internalErrorNoBufferStream
void internalErrorNoBufferStream()
check
bool check()
WII5ModePosition
#include <WII5ModeLowBattery.h>
Inherits:
WII5Mode
Position mode: periodic GPS + Iridium telemetry only.
Lower-power than full Capture mode: turns on GPS, gets a fix, sends a position via Iridium SBD, then idles until the next position window. No IMU capture, no SD writes.
Public Methods
| Return | Name | Description |
|---|---|---|
WII5ModePosition inline |
||
void |
reset |
Reset to WII5POSITION_START. |
void |
begin virtual |
One-time bring-up. |
void |
loop virtual |
State-machine tick. |
void |
start |
Begin a position acquisition cycle. |
void |
stop |
Abort the current cycle. |
WII5ModePosition
inline
inline WII5ModePosition()
reset
void reset()
Reset to WII5POSITION_START.
begin
virtual
virtual void begin()
One-time bring-up.
loop
virtual
virtual void loop()
State-machine tick.
start
void start()
Begin a position acquisition cycle.
stop
void stop()
Abort the current cycle.
Protected Attributes
| Return | Name | Description |
|---|---|---|
bool |
first |
|
elapsedMillis |
displayWait |
|
elapsedMillis |
wait |
|
WII5POSITION_STEPS |
step |
|
WII5POSITION_STEPS |
lastStep |
|
uint32_t |
minutes |
first
bool first
displayWait
elapsedMillis displayWait
wait
elapsedMillis wait
step
WII5POSITION_STEPS step
lastStep
WII5POSITION_STEPS lastStep
minutes
uint32_t minutes
WII5ModeSelfTest
#include <WII5ModeSelfTest.h>
Inherits:
WII5Mode
Self test mode: automated hardware checkout.
Walks every subsystem once (LED, buzzer, button, config, GPS, SD x2, Iridium, batteries, weather, Maths CPU, 5V rail, RTC, Sparton) and records pass/fail in results[]. Three submodes:
-
WII5SM_DEFAULT: AVR-driven, expects an attached operator
-
WII5SM_FROMMATHS: invoked by the Maths CPU; skips Maths checks
-
WII5SM_NOMATHS: simple check, no Maths CPU present
Public Methods
| Return | Name | Description |
|---|---|---|
WII5ModeSelfTest inline |
||
void |
reset |
Reset to WII5ST_START. |
void |
begin virtual |
One-time bring-up. |
void |
loop virtual |
Run the next test step (called repeatedly while active). |
void |
dump |
Print the results table; toOther optionally mirrors elsewhere. |
WII5SELFTEST_MODE |
getMode |
Current self-test submode. |
void |
setMode |
Select self-test submode. |
WII5ModeSelfTest
inline
inline WII5ModeSelfTest()
reset
void reset()
Reset to WII5ST_START.
begin
virtual
virtual void begin()
One-time bring-up.
loop
virtual
virtual void loop()
Run the next test step (called repeatedly while active).
dump
void dump(bool toConsole, Print * toOther, bool hideNone)
Print the results table; toOther optionally mirrors elsewhere.
getMode
WII5SELFTEST_MODE getMode()
Current self-test submode.
setMode
void setMode(WII5SELFTEST_MODE m)
Select self-test submode.
Protected Attributes
| Return | Name | Description |
|---|---|---|
WII5SELFTEST_MODE |
mode |
|
elapsedMillis |
wait |
|
WII5SELFTEST_STEPS |
step |
|
WII5SELFTEST_STEPS |
stepLast |
|
elapsedMillis |
stepWait |
|
uint32_t |
stepCount |
|
bool |
first |
|
uint16_t |
count |
|
uint16_t |
count_passed |
|
uint16_t |
count_failed |
|
uint16_t |
count_nonenc |
|
WII5SELFTEST_STATUS |
results |
mode
WII5SELFTEST_MODE mode
wait
elapsedMillis wait
step
WII5SELFTEST_STEPS step
stepLast
WII5SELFTEST_STEPS stepLast
stepWait
elapsedMillis stepWait
stepCount
uint32_t stepCount
first
bool first
count
uint16_t count
count_passed
uint16_t count_passed
count_failed
uint16_t count_failed
count_nonenc
uint16_t count_nonenc
results
WII5SELFTEST_STATUS results
WII5SerialManager
#include <WII5SerialManager.h>
Subclassed by:
WII5GPS,WII5Iridium
Public Attributes
| Return | Name | Description |
|---|---|---|
TinyGPSPlus * |
gps |
|
char * |
buffer |
|
char * |
binBuffer |
|
uint16_t |
binBufferCount |
|
uint16_t |
binBufferExpect |
gps
TinyGPSPlus * gps
buffer
char * buffer
binBuffer
char * binBuffer
binBufferCount
uint16_t binBufferCount
binBufferExpect
uint16_t binBufferExpect
Public Methods
| Return | Name | Description |
|---|---|---|
WII5SerialManager inline |
||
WII5_DRIVERS |
driverId virtual |
|
void |
loop virtual |
|
void |
beginSerialManager |
|
void |
endSerialManager |
|
void |
setPassthrough |
|
bool |
getPassthrough |
|
void |
setDebug |
|
bool |
getDebug |
|
void |
setCapture |
|
bool |
getCapture |
|
void |
repl |
|
void |
sendNewLine virtual |
|
WII5_SERIALCMDS |
sendAll |
|
WII5_SERIALCMDS |
sendAndWait |
|
void |
setBaudrate virtual |
|
void |
start virtual |
|
void |
stop virtual |
|
void |
setRecords virtual |
|
uint32_t |
getRecords virtual |
|
void |
writePassthrough virtual |
|
void |
writeCapture virtual |
|
void |
enableNmea |
|
void |
sendAtDataLine virtual |
|
void |
setTimeout |
|
uint32_t |
getTimeout |
WII5SerialManager
inline
inline WII5SerialManager()
driverId
virtual
virtual WII5_DRIVERS driverId()
loop
virtual
virtual void loop()
beginSerialManager
void beginSerialManager()
endSerialManager
void endSerialManager()
setPassthrough
void setPassthrough(bool in)
getPassthrough
bool getPassthrough()
setDebug
void setDebug(bool in)
getDebug
bool getDebug()
setCapture
void setCapture(bool in)
getCapture
bool getCapture()
repl
void repl(uint32_t baud)
sendNewLine
virtual
virtual void sendNewLine()
sendAll
WII5_SERIALCMDS sendAll(WII5SERIAL_LAST lastUntil)
sendAndWait
WII5_SERIALCMDS sendAndWait(WII5SERIAL_LAST lastUntil)
setBaudrate
virtual
virtual void setBaudrate(uint32_t baud)
start
virtual
virtual void start(bool force)
stop
virtual
virtual void stop(bool force)
setRecords
virtual
virtual void setRecords(uint32_t in)
getRecords
virtual
virtual uint32_t getRecords()
writePassthrough
virtual
virtual void writePassthrough()
writeCapture
virtual
virtual void writeCapture()
enableNmea
void enableNmea()
sendAtDataLine
virtual
virtual void sendAtDataLine()
setTimeout
void setTimeout(uint32_t in)
getTimeout
uint32_t getTimeout()
Protected Attributes
| Return | Name | Description |
|---|---|---|
HardwareSerial * |
stream |
|
bool |
capture |
|
bool |
passthrough |
|
bool |
debug |
|
uint32_t |
sendCount |
|
elapsedMillis |
processWait |
|
uint32_t |
processTimeout |
|
uint8_t |
bufMax |
|
char |
fieldBuffer |
|
uint8_t |
bufCount |
|
uint8_t |
fieldLoc |
|
uint8_t |
fieldCount |
|
WII5SERIAL_PARSERS |
processMode |
|
uint8_t |
programCount |
|
uint8_t |
programTotal |
|
uint32_t |
recordCount |
|
uint32_t |
recordTotal |
|
WII5SERIAL_LAST |
last |
|
uint32_t |
lastVal |
|
uint32_t |
recordVals |
|
char * |
p |
stream
HardwareSerial * stream
capture
bool capture
passthrough
bool passthrough
debug
bool debug
sendCount
uint32_t sendCount
processWait
elapsedMillis processWait
processTimeout
uint32_t processTimeout
bufMax
uint8_t bufMax
fieldBuffer
char fieldBuffer
bufCount
uint8_t bufCount
fieldLoc
uint8_t fieldLoc
fieldCount
uint8_t fieldCount
processMode
WII5SERIAL_PARSERS processMode
programCount
uint8_t programCount
programTotal
uint8_t programTotal
recordCount
uint32_t recordCount
recordTotal
uint32_t recordTotal
last
WII5SERIAL_LAST last
lastVal
uint32_t lastVal
recordVals
uint32_t recordVals
p
char * p
Protected Methods
| Return | Name | Description |
|---|---|---|
bool |
processSerial virtual |
|
void |
processBufferField virtual |
|
void |
processBufferOK virtual |
|
void |
processBufferLine virtual |
|
void |
processRecord virtual |
|
void |
programLine virtual |
|
void |
sendLine virtual |
|
void |
consolePrefix virtual |
|
void |
consoleBuffer virtual |
|
void |
setBuffer virtual |
processSerial
virtual
virtual bool processSerial(char in)
processBufferField
virtual
virtual void processBufferField(char * buf, uint8_t len)
processBufferOK
virtual
virtual void processBufferOK()
processBufferLine
virtual
virtual void processBufferLine()
processRecord
virtual
virtual void processRecord()
programLine
virtual
virtual void programLine(uint16_t l)
sendLine
virtual
virtual void sendLine(uint16_t l)
consolePrefix
virtual
virtual void consolePrefix(bool input)
consoleBuffer
virtual
virtual void consoleBuffer(bool input, bool useLog)
setBuffer
virtual
virtual void setBuffer(char * buf, uint8_t sz)
WII5Communications
#include <WII5Communications.h>
Inherits:
WII5Mode
Communications orchestration: manages a state machine across Iridium send/receive cycles, including pulling messages from SD blocks and splitting them across multiple SBD frames when too large.
Three orthogonal modes:
-
autoMode: scan SD for unsent metadata and push it
-
simpleMode: only send what's explicitly requested
-
testMode: smoke-test the comms path without burning satellite minutes
Plus a disabled master switch.
Public Methods
| Return | Name | Description |
|---|---|---|
WII5Communications inline |
||
bool |
isRunning |
Is the comms state machine actively in a send/receive cycle? |
void |
begin virtual |
One-time bring-up. |
void |
loop virtual |
State-machine tick: drives Iridium and SD interactions. |
void |
start |
Begin a new comms cycle (send pending data). |
void |
stop |
Abort the current comms cycle and idle. |
void |
signalSD |
Hint to autoMode that the SD card has fresh data worth scanning. |
void |
sendBinModeType |
Queue a BinData message of type t, optionally pulled from given SD blocks. |
void |
sendText |
Send arbitrary buffered text (bypasses the BinData frame). |
void |
sendError |
Send the most recent error as an SBD message. |
void |
findRecord |
Find an SD record matching (binType, recordCount) for retransmission. |
void |
setTESTING |
Enable test mode (no real Iridium traffic). |
void |
setAutoMode |
Enable autoMode: periodically scan SD and push new data. |
void |
setSimpleMode |
Enable simpleMode: send only what is explicitly requested. |
bool |
getAutoMode |
Is autoMode currently the active mode? |
bool |
getSimpleMode |
Is simpleMode currently the active mode? |
bool |
setDisabled |
Master enable/disable; returns previous state. |
WII5Communications
inline
inline WII5Communications()
isRunning
bool isRunning()
Is the comms state machine actively in a send/receive cycle?
begin
virtual
virtual void begin()
One-time bring-up.
loop
virtual
virtual void loop()
State-machine tick: drives Iridium and SD interactions.
start
void start()
Begin a new comms cycle (send pending data).
stop
void stop()
Abort the current comms cycle and idle.
signalSD
void signalSD()
Hint to autoMode that the SD card has fresh data worth scanning.
sendBinModeType
void sendBinModeType(uint32_t t, uint32_t recordCount, uint32_t mdBlock, uint32_t resultsBlock)
Queue a BinData message of type t, optionally pulled from given SD blocks.
sendText
void sendText(void * buf, uint16_t bufSize)
Send arbitrary buffered text (bypasses the BinData frame).
sendError
void sendError()
Send the most recent error as an SBD message.
findRecord
void findRecord(uint32_t t, uint32_t recordCount)
Find an SD record matching (binType, recordCount) for retransmission.
setTESTING
void setTESTING()
Enable test mode (no real Iridium traffic).
setAutoMode
void setAutoMode()
Enable autoMode: periodically scan SD and push new data.
setSimpleMode
void setSimpleMode()
Enable simpleMode: send only what is explicitly requested.
getAutoMode
bool getAutoMode()
Is autoMode currently the active mode?
getSimpleMode
bool getSimpleMode()
Is simpleMode currently the active mode?
setDisabled
bool setDisabled(bool in)
Master enable/disable; returns previous state.
Protected Attributes
| Return | Name | Description |
|---|---|---|
bool |
disabled |
|
bool |
autoMode |
|
bool |
metadataScan |
|
bool |
testMode |
|
elapsedMillis |
lastSuccess |
|
elapsedMillis |
requestWait |
|
uint32_t |
requestBinType |
|
uint32_t |
requestRecordCount |
|
uint32_t |
requestMetadataBlock |
|
uint32_t |
requestResultsBlock |
|
uint8_t |
sdCardId |
|
bool |
updateStatus |
|
uint32_t |
sdStartBlock |
|
uint32_t |
sdCurrentBlock |
|
uint8_t |
countSucces |
|
uint8_t |
countFailed |
|
uint16_t |
countSend |
|
bool |
waitStatus |
|
uint32_t |
sdDone |
|
uint32_t |
sdTried |
|
uint32_t |
findBinType |
|
uint32_t |
findRecordCount |
|
bool |
first |
|
elapsedMillis |
displayWait |
|
elapsedMillis |
wait |
|
WII5COMMUNICATIONS_STEPS |
step |
|
WII5COMMUNICATIONS_STEPS |
lastStep |
|
uint32_t |
minutes |
|
uint8_t |
binNextBit |
|
uint8_t |
binCount |
|
uint32_t |
binType |
|
uint32_t |
mainBinType |
|
uint32_t |
metadataBlock |
|
uint32_t |
resultsBlock |
|
uint32_t |
mainRecordCount |
disabled
bool disabled
autoMode
bool autoMode
metadataScan
bool metadataScan
testMode
bool testMode
lastSuccess
elapsedMillis lastSuccess
requestWait
elapsedMillis requestWait
requestBinType
uint32_t requestBinType
requestRecordCount
uint32_t requestRecordCount
requestMetadataBlock
uint32_t requestMetadataBlock
requestResultsBlock
uint32_t requestResultsBlock
sdCardId
uint8_t sdCardId
updateStatus
bool updateStatus
sdStartBlock
uint32_t sdStartBlock
sdCurrentBlock
uint32_t sdCurrentBlock
countSucces
uint8_t countSucces
countFailed
uint8_t countFailed
countSend
uint16_t countSend
waitStatus
bool waitStatus
sdDone
uint32_t sdDone
sdTried
uint32_t sdTried
findBinType
uint32_t findBinType
findRecordCount
uint32_t findRecordCount
first
bool first
displayWait
elapsedMillis displayWait
wait
elapsedMillis wait
step
WII5COMMUNICATIONS_STEPS step
lastStep
WII5COMMUNICATIONS_STEPS lastStep
minutes
uint32_t minutes
binNextBit
uint8_t binNextBit
binCount
uint8_t binCount
binType
uint32_t binType
mainBinType
uint32_t mainBinType
metadataBlock
uint32_t metadataBlock
resultsBlock
uint32_t resultsBlock
mainRecordCount
uint32_t mainRecordCount
WII5ModeLowBattery
#include <WII5ModePosition.h>
Inherits:
WII5Mode
Low-battery mode: degraded operation when supply is depleted.
Suppresses Capture mode's heavy operations (IMU, SD writes), keeps a minimum-viable position+telemetry cadence, and pesters Iridium with a battery-low alert. The buoy returns to its default mode once battery voltage recovers (or via an explicit Iridium override).
Public Methods
| Return | Name | Description |
|---|---|---|
WII5ModeLowBattery inline |
||
void |
reset |
Reset to WII5LOWBATTERY_START. |
void |
begin virtual |
One-time bring-up. |
void |
loop virtual |
State-machine tick. |
void |
start |
Begin a low-battery alert cycle. |
void |
stop |
Abort the current cycle. |
WII5ModeLowBattery
inline
inline WII5ModeLowBattery()
reset
void reset()
Reset to WII5LOWBATTERY_START.
begin
virtual
virtual void begin()
One-time bring-up.
loop
virtual
virtual void loop()
State-machine tick.
start
void start()
Begin a low-battery alert cycle.
stop
void stop()
Abort the current cycle.
Protected Attributes
| Return | Name | Description |
|---|---|---|
bool |
first |
|
elapsedMillis |
displayWait |
|
elapsedMillis |
wait |
|
WII5LOWBATTERY_STEPS |
step |
|
WII5LOWBATTERY_STEPS |
lastStep |
|
uint32_t |
minutes |
first
bool first
displayWait
elapsedMillis displayWait
wait
elapsedMillis wait
step
WII5LOWBATTERY_STEPS step
lastStep
WII5LOWBATTERY_STEPS lastStep
minutes
uint32_t minutes
WII5ModeManualTest
#include <WII5ModeManualTest.h>
Inherits:
WII5Mode
Manual test mode: operator-driven hardware exercise.
Provides a console REPL where the operator types single-letter commands ("X;", "G;", etc.) to exercise individual subsystems (LEDs, buttons, GPS, Iridium, Sparton, SD cards, etc.). Used in the lab and during pre-deployment checkout.
Public Attributes
| Return | Name | Description |
|---|---|---|
bool |
enableMetadata |
|
bool |
enableIridium |
|
bool |
enableGps |
|
bool |
enableSparton |
|
bool |
enableBattery |
|
bool |
waitGPS |
enableMetadata
bool enableMetadata
enableIridium
bool enableIridium
enableGps
bool enableGps
enableSparton
bool enableSparton
enableBattery
bool enableBattery
waitGPS
bool waitGPS
Public Methods
| Return | Name | Description |
|---|---|---|
WII5ModeManualTest inline |
||
void |
reset |
Reset internal counters. |
void |
begin virtual |
One-time bring-up. |
void |
loop virtual |
Tick: read console, dispatch one-shot test commands. |
WII5ModeManualTest
inline
inline WII5ModeManualTest()
reset
void reset()
Reset internal counters.
begin
virtual
virtual void begin()
One-time bring-up.
loop
virtual
virtual void loop()
Tick: read console, dispatch one-shot test commands.
Protected Attributes
| Return | Name | Description |
|---|---|---|
elapsedMillis |
wait |
|
uint8_t |
pulsePin |
|
elapsedMillis |
pulseWait |
wait
elapsedMillis wait
pulsePin
uint8_t pulsePin
pulseWait
elapsedMillis pulseWait
WII5Weather_18B20
#include <WII5Weather_18B20.h>
Inherits:
WII5Power
Public Attributes
| Return | Name | Description |
|---|---|---|
elapsedMillis |
age |
|
int32_t |
value |
age
elapsedMillis age
value
int32_t value
Public Methods
| Return | Name | Description |
|---|---|---|
WII5Weather_18B20 inline |
||
WII5_CONTROLLERS |
controllerId virtual inline |
Identify the controller category for logging/status. |
WII5_DRIVERS |
driverId virtual inline |
Identify the driver category for logging/status. |
void |
begin |
|
void |
loop |
|
bool |
temperatureRead |
WII5Weather_18B20
inline
inline WII5Weather_18B20()
controllerId
virtual inline
virtual inline WII5_CONTROLLERS controllerId()
Identify the controller category for logging/status.
driverId
virtual inline
virtual inline WII5_DRIVERS driverId()
Identify the driver category for logging/status.
begin
void begin()
loop
void loop()
temperatureRead
bool temperatureRead()
Protected Attributes
| Return | Name | Description |
|---|---|---|
byte |
data |
|
byte |
addr |
|
float |
currentTemperature |
|
elapsedMillis |
stepWait |
data
byte data
addr
byte addr
currentTemperature
float currentTemperature
stepWait
elapsedMillis stepWait
typeConfig
#include <WII5Sh3dConfig.h>
Public Attributes
| Return | Name | Description |
|---|---|---|
SH3D_TYPE_PACKET_TYPE |
configType |
|
SH3D_TYPE_PACKET_VERSION |
configVersion |
|
SH3D_TYPE_UNIQUEID |
nodeId |
|
SH3D_TYPE_COUNTER |
runCount |
|
SH3D_TYPE_COUNTER |
recordCount |
|
SH3D_TYPE_COUNTER |
storageLogLast |
|
SH3D_TYPE_COUNTER |
storageSensorLast |
configType
SH3D_TYPE_PACKET_TYPE configType
configVersion
SH3D_TYPE_PACKET_VERSION configVersion
nodeId
SH3D_TYPE_UNIQUEID nodeId
runCount
SH3D_TYPE_COUNTER runCount
recordCount
SH3D_TYPE_COUNTER recordCount
storageLogLast
SH3D_TYPE_COUNTER storageLogLast
storageSensorLast
SH3D_TYPE_COUNTER storageSensorLast
WII5Command
#include <WII5Data.h>
Public Attributes
| Return | Name | Description |
|---|---|---|
uint32_t |
deviceId |
|
uint32_t |
recordCount |
|
time_t |
last |
|
uint32_t |
age |
|
uint32_t |
uptime |
deviceId
uint32_t deviceId
recordCount
uint32_t recordCount
last
time_t last
age
uint32_t age
uptime
uint32_t uptime
WII5Processed
#include <WII5DataShared.h>
Public Attributes
| Return | Name | Description |
|---|---|---|
WII5Processed1 |
processed1 |
|
WII5Processed2 |
processed2 |
processed1
WII5Processed1 processed1
processed2
WII5Processed2 processed2
WII5Processed1
#include <WII5DataShared.h>
Public Attributes
| Return | Name | Description |
|---|---|---|
float |
part1float |
part1float
float part1float
WII5Processed2
#include <WII5DataShared.h>
Public Attributes
| Return | Name | Description |
|---|---|---|
float |
part2float |
|
int |
part2int |
part2float
float part2float
part2int
int part2int
WII5_BINDATA_0
#include <WII5BinData.h>
Public Attributes
| Return | Name | Description |
|---|---|---|
uint32_t |
status |
|
time_t |
last |
|
int16_t |
voltage |
|
int16_t |
temperature |
|
uint8_t |
mode |
|
float |
gps_lat |
|
float |
gps_lon |
status
uint32_t status
last
time_t last
voltage
int16_t voltage
temperature
int16_t temperature
mode
uint8_t mode
gps_lat
float gps_lat
gps_lon
float gps_lon
WII5_BINDATA_1
#include <WII5BinData.h>
Public Attributes
| Return | Name | Description |
|---|---|---|
uint16_t |
lastRunTime |
|
time_t |
when |
|
int16_t |
altitude |
|
uint8_t |
satellites |
|
float |
hdop |
lastRunTime
uint16_t lastRunTime
when
time_t when
altitude
int16_t altitude
satellites
uint8_t satellites
hdop
float hdop
WII5_BINDATA_2
#include <WII5BinData.h>
Public Attributes
| Return | Name | Description |
|---|---|---|
uint16_t |
lastRunTime |
|
uint8_t |
signalQuality |
lastRunTime
uint16_t lastRunTime
signalQuality
uint8_t signalQuality
WII5_BINDATA_3
#include <WII5BinData.h>
Public Attributes
| Return | Name | Description |
|---|---|---|
uint32_t |
status |
|
uint32_t |
command |
|
uint8_t |
id |
|
uint8_t |
response |
|
char |
message |
status
uint32_t status
command
uint32_t command
id
uint8_t id
response
uint8_t response
message
char message
WII5_BINDATA_4
#include <WII5BinData.h>
Public Attributes
| Return | Name | Description |
|---|---|---|
char |
message |
message
char message
WII5_BINDATA_5
#include <WII5BinData.h>
Public Attributes
| Return | Name | Description |
|---|---|---|
uint32_t |
runCount |
|
uint32_t |
integerVersion |
runCount
uint32_t runCount
integerVersion
uint32_t integerVersion
WII5_BINDATA_6
#include <WII5BinData.h>
Public Attributes
| Return | Name | Description |
|---|---|---|
float |
qf_mvar |
|
float |
qf_p_accel |
|
float |
qf_imu |
|
float |
qf_head |
|
float |
a |
|
float |
b |
qf_mvar
float qf_mvar
qf_p_accel
float qf_p_accel
qf_imu
float qf_imu
qf_head
float qf_head
a
float a
b
float b
WII5_BINDATA_7
#include <WII5BinData.h>
Public Attributes
| Return | Name | Description |
|---|---|---|
float |
tz_max |
|
float |
htm_max |
|
float |
hcm_max |
|
float |
hz_max |
tz_max
float tz_max
htm_max
float htm_max
hcm_max
float hcm_max
hz_max
float hz_max
WII5_BINDATA_8
#include <WII5BinData.h>
Public Attributes
| Return | Name | Description |
|---|---|---|
WII5Processed1 |
processed1 |
processed1
WII5Processed1 processed1
WII5_BINDATA_9
#include <WII5BinData.h>
Public Attributes
| Return | Name | Description |
|---|---|---|
WII5Processed2 |
processed2 |
processed2
WII5Processed2 processed2
WII5_BINDATA_10
#include <WII5BinData.h>
Public Attributes
| Return | Name | Description |
|---|---|---|
WII5MetaDataObject |
metadata |
metadata
WII5MetaDataObject metadata
WII5_BINDATA_11
#include <WII5BinData.h>
Public Attributes
| Return | Name | Description |
|---|---|---|
int |
direction |
direction
int direction
WII5_BINDATA_12
#include <WII5BinData.h>
Public Attributes
| Return | Name | Description |
|---|---|---|
float |
hmo |
|
float |
theta |
|
float |
dp |
|
float |
s |
|
float |
r |
|
float |
nstd |
|
float |
f2 |
|
float |
yaw_std |
|
float |
open_water |
|
float |
power_diff |
|
float |
tp |
hmo
float hmo
theta
float theta
dp
float dp
s
float s
r
float r
nstd
float nstd
f2
float f2
yaw_std
float yaw_std
open_water
float open_water
power_diff
float power_diff
tp
float tp
WII5_BINDATA_13
#include <WII5BinData.h>
Public Attributes
| Return | Name | Description |
|---|---|---|
float |
moments |
moments
float moments
WII5_BINDATA_14
#include <WII5BinData.h>
Public Attributes
| Return | Name | Description |
|---|---|---|
float |
psd |
psd
float psd
WII5_BINDATA_15
#include <WII5BinData.h>
WII5_Data_Config
#include <WII5Data.h>
Public Attributes
| Return | Name | Description |
|---|---|---|
uint8_t |
type |
|
uint8_t |
version |
|
time_t |
disableLowBattery |
|
uint32_t |
flags |
|
uint32_t |
gpsTimeout |
|
uint32_t |
capturePeriod |
|
uint32_t |
captureBinaryType |
|
uint32_t |
captureRecords |
|
uint32_t |
positionPeriod |
|
uint32_t |
positionBinaryType |
|
uint32_t |
sleepPeriod |
|
uint32_t |
sleepBinaryType |
|
uint32_t |
sleepMaths |
|
WII5_MODES |
defaultMode |
|
WII5_MODES |
temporaryMode |
|
WII5_MODES |
temporaryModeExpires |
|
uint16_t |
batteryLow |
|
uint16_t |
batteryMid |
|
uint32_t |
sleepUntil |
type
uint8_t type
version
uint8_t version
disableLowBattery
time_t disableLowBattery
flags
uint32_t flags
gpsTimeout
uint32_t gpsTimeout
capturePeriod
uint32_t capturePeriod
captureBinaryType
uint32_t captureBinaryType
captureRecords
uint32_t captureRecords
positionPeriod
uint32_t positionPeriod
positionBinaryType
uint32_t positionBinaryType
sleepPeriod
uint32_t sleepPeriod
sleepBinaryType
uint32_t sleepBinaryType
sleepMaths
uint32_t sleepMaths
defaultMode
WII5_MODES defaultMode
temporaryMode
WII5_MODES temporaryMode
temporaryModeExpires
WII5_MODES temporaryModeExpires
batteryLow
uint16_t batteryLow
batteryMid
uint16_t batteryMid
sleepUntil
uint32_t sleepUntil
WII5MetaDataObject
#include <WII5DataShared.h>
Public Attributes
| Return | Name | Description |
|---|---|---|
uint32_t |
deviceId |
|
uint32_t |
recordCount |
|
time_t |
last |
|
uint32_t |
age |
|
uint32_t |
uptime |
|
uint32_t |
version |
|
int32_t |
temperatureValue |
|
uint32_t |
temperatureAge |
|
int32_t |
batteryValue |
|
uint32_t |
batteryAge |
|
float |
gpsLat |
|
float |
gpsLon |
|
float |
gpsAlt |
|
int32_t |
gpsSat |
|
int32_t |
gpsHdop |
|
uint32_t |
gpsFixTime |
|
uint32_t |
gpsAge |
|
uint32_t |
captureWriteMax |
|
uint32_t |
captureWriteMin |
|
uint32_t |
captureWriteOver |
|
uint32_t |
captureTimeError |
|
uint32_t |
captureSizeError |
|
uint32_t |
captureStartTime |
|
uint8_t |
mode |
|
uint32_t |
iridiumFixTime |
|
uint32_t |
iridiumSignalQuality |
deviceId
uint32_t deviceId
recordCount
uint32_t recordCount
last
time_t last
age
uint32_t age
uptime
uint32_t uptime
version
uint32_t version
temperatureValue
int32_t temperatureValue
temperatureAge
uint32_t temperatureAge
batteryValue
int32_t batteryValue
batteryAge
uint32_t batteryAge
gpsLat
float gpsLat
gpsLon
float gpsLon
gpsAlt
float gpsAlt
gpsSat
int32_t gpsSat
gpsHdop
int32_t gpsHdop
gpsFixTime
uint32_t gpsFixTime
gpsAge
uint32_t gpsAge
captureWriteMax
uint32_t captureWriteMax
captureWriteMin
uint32_t captureWriteMin
captureWriteOver
uint32_t captureWriteOver
captureTimeError
uint32_t captureTimeError
captureSizeError
uint32_t captureSizeError
captureStartTime
uint32_t captureStartTime
mode
uint8_t mode
iridiumFixTime
uint32_t iridiumFixTime
iridiumSignalQuality
uint32_t iridiumSignalQuality
WII5_BINDATA_HEADER
#include <WII5BinData.h>
Public Attributes
| Return | Name | Description |
|---|---|---|
uint16_t |
wii_binary_id |
|
uint32_t |
bindata_type |
|
uint8_t |
bindata_packet |
|
uint32_t |
deviceId |
|
uint32_t |
recordCount |
wii_binary_id
uint16_t wii_binary_id
bindata_type
uint32_t bindata_type
bindata_packet
uint8_t bindata_packet
deviceId
uint32_t deviceId
recordCount
uint32_t recordCount
WII5_DATA_SpartonBinary
#include <WII5DataShared.h>
Public Attributes
| Return | Name | Description |
|---|---|---|
uint8_t |
byteCount |
|
uint8_t |
status |
|
uint8_t |
channel |
|
float |
pose_x |
|
float |
pose_y |
|
float |
pose_z |
|
float |
accel_x |
|
float |
accel_y |
|
float |
accel_z |
|
uint32_t |
stamp |
|
uint16_t |
crc |
byteCount
uint8_t byteCount
status
uint8_t status
channel
uint8_t channel
pose_x
float pose_x
pose_y
float pose_y
pose_z
float pose_z
accel_x
float accel_x
accel_y
float accel_y
accel_z
float accel_z
stamp
uint32_t stamp
crc
uint16_t crc
Generated by Moxygen