# API Reference | Name | Description | |------|-------------| | [`WII5`](#wii5) | Common base class for [WII5](#wii5) drivers and controllers. | | [`WII5GPS`](#wii5gps-2) | GPS driver: u-blox NMEA via TinyGPS++. | | [`WII5RTC`](#wii5rtc-2) | | | [`WII5Help`](#wii5help-2) | | | [`WII5Mode`](#wii5mode) | Base class for run-time operating modes. | | [`WII5Maths`](#wii5maths-2) | | | [`WII5Power`](#wii5power) | | | [`WII5Setup`](#wii5setup-2) | | | [`WII5Config`](#wii5config-2) | | | [`WII5Sh3dIO`](#wii5sh3dio) | | | [`WII5Battery`](#wii5battery-2) | | | [`WII5BinData`](#wii5bindata-2) | Binary message format for Iridium SBD. | | [`WII5Display`](#wii5display-2) | | | [`WII5Iridium`](#wii5iridium-2) | Driver for the Iridium 9602/9603 SBD modem. | | [`WII5Sparton`](#wii5sparton-2) | Driver for the Sparton AHRS-M1 / AHRS-M2 IMU. | | [`WII5Strings`](#wii5strings-2) | | | [`WII5Commands`](#wii5commands-2) | Text-protocol command parser and dispatcher. | | [`WII5Sh3dUtil`](#wii5sh3dutil) | | | [`WII5ModeSleep`](#wii5modesleep-2) | Sleep mode: long sleeps between wake-ups. | | [`WII5Controller`](#wii5controller-2) | Top-level firmware controller. | | [`WII5Sh3dConfig`](#wii5sh3dconfig) | | | [`WII5ModeCapture`](#wii5modecapture-2) | Capture mode: time-driven IMU data capture and SD logging. | | [`WII5Sh3dConsole`](#wii5sh3dconsole) | Console abstraction over multiple Stream objects. | | [`WII5ModePosition`](#wii5modeposition-2) | Position mode: periodic GPS + Iridium telemetry only. | | [`WII5ModeSelfTest`](#wii5modeselftest-2) | Self test mode: automated hardware checkout. | | [`WII5SerialManager`](#wii5serialmanager) | | | [`WII5Communications`](#wii5communications-2) | 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`](#wii5modelowbattery-2) | Low-battery mode: degraded operation when supply is depleted. | | [`WII5ModeManualTest`](#wii5modemanualtest-2) | Manual test mode: operator-driven hardware exercise. | | [`WII5Weather_18B20`](#wii5weather_18b20-2) | | | [`typeConfig`](#typeconfig) | | | [`WII5Command`](#wii5command) | | | [`WII5Processed`](#wii5processed) | | | [`WII5Processed1`](#wii5processed1) | | | [`WII5Processed2`](#wii5processed2) | | | [`WII5_BINDATA_0`](#wii5_bindata_0) | | | [`WII5_BINDATA_1`](#wii5_bindata_1) | | | [`WII5_BINDATA_2`](#wii5_bindata_2) | | | [`WII5_BINDATA_3`](#wii5_bindata_3) | | | [`WII5_BINDATA_4`](#wii5_bindata_4) | | | [`WII5_BINDATA_5`](#wii5_bindata_5) | | | [`WII5_BINDATA_6`](#wii5_bindata_6) | | | [`WII5_BINDATA_7`](#wii5_bindata_7) | | | [`WII5_BINDATA_8`](#wii5_bindata_8) | | | [`WII5_BINDATA_9`](#wii5_bindata_9) | | | [`WII5_BINDATA_10`](#wii5_bindata_10) | | | [`WII5_BINDATA_11`](#wii5_bindata_11) | | | [`WII5_BINDATA_12`](#wii5_bindata_12) | | | [`WII5_BINDATA_13`](#wii5_bindata_13) | | | [`WII5_BINDATA_14`](#wii5_bindata_14) | | | [`WII5_BINDATA_15`](#wii5_bindata_15) | | | [`WII5_Data_Config`](#wii5_data_config) | | | [`WII5MetaDataObject`](#wii5metadataobject) | | | [`WII5_BINDATA_HEADER`](#wii5_bindata_header) | | | [`WII5_DATA_SpartonBinary`](#wii5_data_spartonbinary) | | ## Enumerations #### WII5SELFTEST_DEVICES ```cpp 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 ```cpp 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 ```cpp enum WII5_DEVICES ``` | Value | Description | |-------|-------------| | `WII5DEVICE_UNKNOWN` | | | `WII5DEVICE_WAVEBUOY` | | | `WII5DEVICE_MATHS` | | | `WII5DEVICE_CONTROLLER` | | | `WII5DEVICE_CLI` | | | `WII5DEVICE_SERVER` | | #### WII5_CONTROLLERS ```cpp 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 ```cpp 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 ```cpp enum WII5_PORTS ``` | Value | Description | |-------|-------------| | `WII5PORT_UNKNOWN` | | | `WII5PORT_RADIO` | | | `WII5PORT_COMMS` | | | `WII5PORT_CONSOLE` | | | `WII5PORT_MATHS` | | #### WII5_MATHSMODE ```cpp enum WII5_MATHSMODE ``` | Value | Description | |-------|-------------| | `WII5MATHSMODE_UNKNOWN` | | | `WII5MATHSMODE_AUTO` | | | `WII5MATHSMODE_BUTTON` | | | `WII5MATHSMODE_COMMS` | | #### WII5_AREAS ```cpp enum WII5_AREAS ``` | Value | Description | |-------|-------------| | `WII5AREA_UNKNOWN` | | | `WII5AREA_WII5` | | | `WII5AREA_HELP` | | | `WII5AREA_SH3D` | | #### WII5_COMMANDS ```cpp 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 ```cpp enum WII5_RESULTS ``` | Value | Description | |-------|-------------| | `WII5RESULTS_UNKNOWN` | | | `WII5RESULTS_SUCCESS` | | | `WII5RESULTS_INVALID` | | | `WII5RESULTS_RETRY` | | | `WII5RESULTS_ERROR` | | | `WII5RESULTS_NOREPLY` | | #### WII5_STATUS ```cpp enum WII5_STATUS ``` | Value | Description | |-------|-------------| | `WII5STATUS_UNKNOWN` | | | `WII5STATUS_OFF` | | | `WII5STATUS_ON` | | | `WII5STATUS_ON_VALID` | | | `WII5STATUS_BUSY` | | | `WII5STATUS_WAITING` | | | `WII5STATUS_ERROR` | | #### WII5_ERRORS ```cpp enum WII5_ERRORS ``` | Value | Description | |-------|-------------| | `WII5ERROR_UNKNOWN` | | | `WII5ERROR_NONE` | | | `WII5ERROR_RETRY` | | | `WII5ERROR_INIT` | | | `WII5ERROR_MEMORY` | | | `WII5ERROR_TIMEOUT` | | | `WII5ERROR_FATAL` | | #### WII5_SERIALCMDS ```cpp enum WII5_SERIALCMDS ``` | Value | Description | |-------|-------------| | `WII5SERIALCMD_NONE` | | | `WII5SERIALCMD_OK` | | | `WII5SERIALCMD_WAITING` | | | `WII5SERIALCMD_TIMEOUT` | | | `WII5SERIALCMD_ERROR` | | #### WII5_MODES ```cpp 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 ```cpp enum WII5_FLAGS ``` | Value | Description | |-------|-------------| | `WII5FLAGS_GPSDISABLE` | | | `WII5FLAGS_RTCDISABLE` | | | `WII5FLAGS_RADIOOFF` | | | `WII5FLAGS_ENABLELOGS` | | | `WII5FLAGS_DEBUGLOGS` | | | `WII5FLAGS_DISABLEBEEP` | | #### WII5GPS_MODES ```cpp enum WII5GPS_MODES ``` | Value | Description | |-------|-------------| | `WII5GPS_UNKNOWN` | | | `WII5GPS_OFF` | | | `WII5GPS_ON` | | | `WII5GPS_TIME` | | | `WII5GPS_POS` | | | `WII5GPS_ACCURATE` | | | `WII5GPS_REPEAT` | | #### WII5_SWITCH ```cpp enum WII5_SWITCH ``` | Value | Description | |-------|-------------| | `WII5SWITCH_NONE` | | | `WII5SWITCH_ON` | | | `WII5SWITCH_OFF` | | | `WII5SWITCH_TOGGLE` | | #### WII5IRIDIUM_SEND_RESULT ```cpp enum WII5IRIDIUM_SEND_RESULT ``` | Value | Description | |-------|-------------| | `WII5IRIDIUMSENDRESULT_NONE` | | | `WII5IRIDIUMSENDRESULT_OK` | | | `WII5IRIDIUMSENDRESULT_FAILED_TIMEOUT` | | | `WII5IRIDIUMSENDRESULT_FAILED_OTHER` | | #### WII5IRIDIUM_RECEIVE_RESULT ```cpp enum WII5IRIDIUM_RECEIVE_RESULT ``` | Value | Description | |-------|-------------| | `WII5IRIDIUMRECEIVERESULT_NONE` | | | `WII5IRIDIUMRECEIVERESULT_OK` | | #### WII5MATHS_STEPS ```cpp 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` | | #### ```cpp 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 ```cpp enum WII5BATTERY_STEPS ``` | Value | Description | |-------|-------------| | `WII5BATTERY_OFF` | | | `WII5BATTERY_ON` | | | `WII5BATTERY_MEASURE` | | | `WII5BATTERY_STORE` | | | `WII5BATTERY_ANALYSE` | | | `WII5BATTERY_FINISH` | | #### WII5IRIDIUM_REQUEST ```cpp 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 ```cpp enum WII5IRIDIUM_STATUS ``` | Value | Description | |-------|-------------| | `WII5IRIDIUM_STATUS_READY` | | | `WII5IRIDIUM_STATUS_BUSY` | | | `WII5IRIDIUM_STATUS_FAILED` | | #### WII5IRIDIUM_STEPS ```cpp 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 ```cpp 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 ```cpp 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 ```cpp enum WII5SLEEP_STEPS ``` | Value | Description | |-------|-------------| | `WII5SLEEP_START` | | | `WII5SLEEP_WAIT` | | | `WII5SLEEP_SLEEPING` | | | `WII5SLEEP_BUTTONS` | | | `WII5SLEEP_UPDATE` | | | `WII5SLEEP_TIME` | | | `WII5SLEEP_COMMS` | | | `WII5SLEEP_FINISH` | | #### WII5CAPTURE_TYPE ```cpp enum WII5CAPTURE_TYPE ``` | Value | Description | |-------|-------------| | `WII5CAPTURETYPE_UNKNOWN` | | | `WII5CAPTURETYPE_MANUAL` | | | `WII5CAPTURETYPE_TIME` | | #### WII5CAPTURE_STEPS ```cpp 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 ```cpp enum WII5LOWBATTERY_STEPS ``` | Value | Description | |-------|-------------| | `WII5LOWBATTERY_START` | | | `WII5LOWBATTERY_STROBE` | | | `WII5LOWBATTERY_TIME` | | | `WII5LOWBATTERY_GPS_START` | | | `WII5LOWBATTERY_GPS_WAIT` | | | `WII5LOWBATTERY_IRIDIUM_WAIT` | | | `WII5LOWBATTERY_END` | | #### WII5SELFTEST_STEPS ```cpp 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 ```cpp enum WII5SELFTEST_MODE ``` | Value | Description | |-------|-------------| | `WII5SM_DEFAULT` | | | `WII5SM_FROMMATHS` | | | `WII5SM_NOMATHS` | | #### WII5SERIAL_PARSERS ```cpp enum WII5SERIAL_PARSERS ``` | Value | Description | |-------|-------------| | `WII5SERIALPARSER_NONE` | | | `WII5SERIALPARSER_LINE` | | | `WII5SERIALPARSER_BINARY1` | | | `WII5SERIALPARSER_RECORD` | | | `WII5SERIALPARSER_OKHUH` | | | `WII5SERIALPARSER_AT` | | #### WII5SERIAL_LAST ```cpp 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 ```cpp 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 ```cpp 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 ```cpp unsigned long time_t() ``` #### CallbackFunction ```cpp void(* CallbackFunction() ``` ## Functions #### debugDo ```cpp void debugDo(uint32_t n) ``` Debug breadcrumb: print "DEBUG POINT: " to SerialConsole. #### debugDo ```cpp void debugDo(uint32_t n) ``` Debug breadcrumb: print "DEBUG POINT: " to SerialConsole. #### syncProvider ```cpp uint32_t syncProvider() ``` #### wii5_getPinMode ```cpp int wii5_getPinMode(uint8_t pin) ``` #### sizeExtra ```cpp uint16_t sizeExtra() ``` #### readExtra ```cpp void readExtra(char * data, uint16_t len, uint16_t offset) ``` #### updateExtra ```cpp void updateExtra(char * data, uint16_t len, uint16_t offset) ``` #### ds ```cpp OneWire ds(WEATHER_18B20_DATA) ``` ## Variables #### wii5BufferString ```cpp char wii5BufferString ``` #### wii5BufferConsolePrint ```cpp char wii5BufferConsolePrint ``` #### wii5BufferConsoleCmd ```cpp char wii5BufferConsoleCmd ``` #### wii5BufferIridium ```cpp char wii5BufferIridium ``` #### wii5BinaryIridium ```cpp char wii5BinaryIridium ``` #### wii5BufferGPS ```cpp char wii5BufferGPS ``` #### wii5BufferString ```cpp char wii5BufferString ``` #### wii5BufferConsolePrint ```cpp char wii5BufferConsolePrint ``` #### wii5BufferConsoleCmd ```cpp char wii5BufferConsoleCmd ``` #### wii5BufferIridium ```cpp char wii5BufferIridium ``` #### wii5BinaryIridium ```cpp char wii5BinaryIridium ``` #### wii5BufferGPS ```cpp char wii5BufferGPS ``` #### wii5Gps ```cpp WII5GPS wii5Gps ``` #### wii5RTC ```cpp WII5RTC wii5RTC ``` #### wii5Help ```cpp WII5Help wii5Help ``` #### wii5Gps ```cpp WII5GPS wii5Gps ``` #### wii5Maths ```cpp WII5Maths wii5Maths ``` #### rtc ```cpp RTC_DS3231 rtc ``` #### wii5RTC ```cpp WII5RTC wii5RTC ``` #### wii5Setup ```cpp WII5Setup wii5Setup ``` #### wii5Config ```cpp WII5Config wii5Config ``` #### wii5Help ```cpp WII5Help wii5Help ``` #### sh3dNodeIO ```cpp WII5Sh3dIO sh3dNodeIO ``` #### wii5Battery ```cpp WII5Battery wii5Battery ``` #### wii5BinData ```cpp WII5BinData wii5BinData ``` #### wii5Display ```cpp WII5Display wii5Display ``` #### wii5Iridium ```cpp WII5Iridium wii5Iridium ``` #### wii5Maths ```cpp WII5Maths wii5Maths ``` #### wii5Setup ```cpp WII5Setup wii5Setup ``` #### wii5Sparton ```cpp WII5Sparton wii5Sparton ``` #### wii5Strings ```cpp WII5Strings wii5Strings ``` #### wii5Commands ```cpp WII5Commands wii5Commands ``` #### wii5Config ```cpp WII5Config wii5Config ``` #### sh3dNodeIO ```cpp WII5Sh3dIO sh3dNodeIO ``` #### sh3dNodeUtil ```cpp WII5Sh3dUtil sh3dNodeUtil ``` #### wii5Battery ```cpp WII5Battery wii5Battery ``` #### wii5BinData ```cpp WII5BinData wii5BinData ``` #### bit ```cpp uint8_t bit ``` #### port ```cpp uint8_t port ``` #### reg ```cpp volatile uint8_t * reg ``` #### out ```cpp volatile uint8_t * out ``` #### minutes ```cpp uint32_t minutes ``` #### used ```cpp uint32_t used ``` #### a_start ```cpp uint8_t a_start ``` #### a_end ```cpp uint8_t a_end ``` #### p ```cpp uint8_t p ``` #### wii5Display ```cpp WII5Display wii5Display ``` #### wii5Iridium ```cpp WII5Iridium wii5Iridium ``` #### wii5ModeSleep ```cpp WII5ModeSleep wii5ModeSleep ``` #### firstBoot ```cpp bool firstBoot = true ``` #### c ```cpp char c ``` #### first ```cpp bool first ``` #### startReady ```cpp uint8_t startReady ``` #### wii5Sparton ```cpp WII5Sparton wii5Sparton ``` #### wii5Strings ```cpp WII5Strings wii5Strings ``` #### wii5Commands ```cpp WII5Commands wii5Commands ``` #### wii5Controller ```cpp WII5Controller wii5Controller ``` #### sh3dNodeConfig ```cpp WII5Sh3dConfig sh3dNodeConfig ``` #### sh3dNodeUtil ```cpp WII5Sh3dUtil sh3dNodeUtil ``` #### wii5ModeCapture ```cpp WII5ModeCapture wii5ModeCapture ``` #### wii5ModeSleep ```cpp WII5ModeSleep wii5ModeSleep ``` #### console ```cpp WII5Sh3dConsole console ``` #### wii5Controller ```cpp WII5Controller wii5Controller ``` #### wii5ModeLowBattery ```cpp WII5ModeLowBattery wii5ModeLowBattery ``` #### wii5ModeSelfTest ```cpp WII5ModeSelfTest wii5ModeSelfTest ``` #### sh3dNodeConfig ```cpp WII5Sh3dConfig sh3dNodeConfig ``` #### test1 ```cpp elapsedMillis test1 ``` #### wii5ModeCapture ```cpp WII5ModeCapture wii5ModeCapture ``` #### console ```cpp WII5Sh3dConsole console ``` #### wii5Communications ```cpp WII5Communications wii5Communications ``` #### wii5ModePosition ```cpp WII5ModePosition wii5ModePosition ``` #### wii5ModeManualTest ```cpp WII5ModeManualTest wii5ModeManualTest ``` #### wii5ModePosition ```cpp WII5ModePosition wii5ModePosition ``` #### wii5ModeSelfTest ```cpp WII5ModeSelfTest wii5ModeSelfTest ``` #### ds ```cpp OneWire ds ``` #### wii5Weather_18B20 ```cpp WII5Weather_18B20 wii5Weather_18B20 ``` #### wii5Communications ```cpp WII5Communications wii5Communications ``` #### wii5ModeLowBattery ```cpp WII5ModeLowBattery wii5ModeLowBattery ``` #### sdPrev ```cpp uint16_t sdPrev = 0 ``` #### spartonData ```cpp WII5_DATA_SpartonBinary * spartonData ``` #### binDataType ```cpp uint32_t binDataType = 0 ``` #### firstLoop ```cpp bool firstLoop ``` #### captureWriteTime ```cpp elapsedMicros captureWriteTime ``` #### captureWriteTemp ```cpp uint32_t captureWriteTemp ``` #### captureWriteMax ```cpp uint32_t captureWriteMax = 0 ``` #### captureWriteMin ```cpp uint32_t captureWriteMin = 1000000 ``` #### captureWriteOver ```cpp uint32_t captureWriteOver = 0 ``` #### wii5ModeManualTest ```cpp WII5ModeManualTest wii5ModeManualTest ``` #### wii5Weather_18B20 ```cpp WII5Weather_18B20 wii5Weather_18B20 ``` ## WII5 ```cpp #include ``` > **Subclassed by:** [`WII5Commands`](#wii5commands-2), [`WII5Controller`](#wii5controller-2), [`WII5Power`](#wii5power), [`WII5Setup`](#wii5setup-2) Common base class for [WII5](#wii5) drivers and controllers. Provides controllerId/driverId virtuals so subclasses identify themselves to logging and status helpers. Concrete subclasses include [WII5Power](#wii5power) (power-managed peripherals), [WII5Mode](#wii5mode) (run-time modes), and the various sensor / radio drivers. ### Public Methods | Return | Name | Description | |--------|------|-------------| | | [`WII5`](#wii5-1) `inline` | | | `WII5_CONTROLLERS` | [`controllerId`](#controllerid) `virtual` | Identify the controller category for logging/status. | | `WII5_DRIVERS` | [`driverId`](#driverid) `virtual` | Identify the driver category for logging/status. | | `bool` | [`SJ`](#sj) `virtual` | Sanity check: is the given timestamp in a plausible epoch range? | --- #### WII5 `inline` ```cpp inline WII5() ``` --- #### controllerId `virtual` ```cpp virtual WII5_CONTROLLERS controllerId() ``` Identify the controller category for logging/status. --- #### driverId `virtual` ```cpp virtual WII5_DRIVERS driverId() ``` Identify the driver category for logging/status. --- #### SJ `virtual` ```cpp virtual bool SJ(DdW when) ``` Sanity check: is the given timestamp in a plausible epoch range? ## WII5GPS ```cpp #include ``` > **Inherits:** [`WII5Power`](#wii5power), [`WII5SerialManager`](#wii5serialmanager) GPS driver: u-blox NMEA via TinyGPS++. Manages power-on, fix acquisition, and clock-update flows. NMEA sentences are parsed off the [WII5SerialManager](#wii5serialmanager) base; the result feeds the global `wii5Gps.gps` (TinyGPSPlus) instance for location/altitude/HDOP queries. ### Public Attributes | Return | Name | Description | |--------|------|-------------| | `uint32_t` | [`lastRunTime`](#lastruntime) | | | `time_t` | [`when`](#when) | | | `elapsedMillis` | [`sinceOnLast`](#sinceonlast) | | --- #### lastRunTime ```cpp uint32_t lastRunTime ``` --- #### when ```cpp time_t when ``` --- #### sinceOnLast ```cpp elapsedMillis sinceOnLast ``` ### Public Methods | Return | Name | Description | |--------|------|-------------| | | [`WII5GPS`](#wii5gps-3) `inline` | | | `WII5_CONTROLLERS` | [`controllerId`](#controllerid-1) `virtual` `inline` | Identify the controller category for logging/status. | | `WII5_DRIVERS` | [`driverId`](#driverid-1) `virtual` `inline` | Identify the driver category for logging/status. | | `void` | [`begin`](#begin) | One-time bring-up; pin config comes from the active board file. | | `void` | [`loop`](#loop) `virtual` | State-machine tick: drains NMEA, advances mode. | | `void` | [`setMinutes`](#setminutes) | Set how long the GPS stays on each acquisition window. | | `uint8_t` | [`getMinutes`](#getminutes) | Current acquisition window length, in minutes. | | `void` | [`dump`](#dump) | Print a status dump; `toOther` optionally mirrors to a second Print. | | `void` | [`off`](#off) | Power off the GPS module. | | `void` | [`on`](#on) | Power on the GPS module. | | `void` | [`autoTime`](#autotime) | One-shot acquisition tuned for time only. | | `void` | [`autoPos`](#autopos) | One-shot acquisition tuned for position. | | `void` | [`autoAccurate`](#autoaccurate) | Long acquisition for high-quality fix. | | `void` | [`autoRepeat`](#autorepeat) | Periodic re-acquisition (continuous mode). | | `bool` | [`ready`](#ready) | True once a valid fix is available. | | `bool` | [`isError`](#iserror) | True if the most recent acquisition failed. | | `bool` | [`isTimeValid`](#istimevalid) | True if the time fix is valid (independent of position). | | `bool` | [`isRunning`](#isrunning) | True if a state-machine cycle is in flight. | | `bool` | [`old`](#old) | True if the last fix is older than the configured timeout. | --- #### WII5GPS `inline` ```cpp inline WII5GPS() ``` --- #### controllerId `virtual` `inline` ```cpp virtual inline WII5_CONTROLLERS controllerId() ``` Identify the controller category for logging/status. --- #### driverId `virtual` `inline` ```cpp virtual inline WII5_DRIVERS driverId() ``` Identify the driver category for logging/status. --- #### begin ```cpp void begin() ``` One-time bring-up; pin config comes from the active board file. --- #### loop `virtual` ```cpp virtual void loop() ``` State-machine tick: drains NMEA, advances mode. --- #### setMinutes ```cpp void setMinutes(uint8_t newMinutes) ``` Set how long the GPS stays on each acquisition window. --- #### getMinutes ```cpp uint8_t getMinutes() ``` Current acquisition window length, in minutes. --- #### dump ```cpp void dump(bool toConsole, Print * toOther) ``` Print a status dump; `toOther` optionally mirrors to a second Print. --- #### off ```cpp void off() ``` Power off the GPS module. --- #### on ```cpp void on() ``` Power on the GPS module. --- #### autoTime ```cpp void autoTime() ``` One-shot acquisition tuned for time only. --- #### autoPos ```cpp void autoPos() ``` One-shot acquisition tuned for position. --- #### autoAccurate ```cpp void autoAccurate() ``` Long acquisition for high-quality fix. --- #### autoRepeat ```cpp void autoRepeat() ``` Periodic re-acquisition (continuous mode). --- #### ready ```cpp bool ready() ``` True once a valid fix is available. --- #### isError ```cpp bool isError() ``` True if the most recent acquisition failed. --- #### isTimeValid ```cpp bool isTimeValid() ``` True if the time fix is valid (independent of position). --- #### isRunning ```cpp bool isRunning() ``` True if a state-machine cycle is in flight. --- #### old ```cpp bool old() ``` True if the last fix is older than the configured timeout. ### Protected Attributes | Return | Name | Description | |--------|------|-------------| | `WII5_ERRORS` | [`lastError`](#lasterror) | | | `bool` | [`finished`](#finished) | | | `bool` | [`running`](#running) | | | `WII5GPS_MODES` | [`step`](#step) | | | `WII5GPS_MODES` | [`stepLast`](#steplast) | | | `bool` | [`first`](#first-1) | | | `elapsedMillis` | [`stepWait`](#stepwait) | | | `uint8_t` | [`minutes`](#minutes-1) | | | `elapsedMillis` | [`waitTime`](#waittime) | | | `elapsedMillis` | [`runTime`](#runtime) | | | `elapsedMillis` | [`lastTime`](#lasttime) | | --- #### lastError ```cpp WII5_ERRORS lastError ``` --- #### finished ```cpp bool finished ``` --- #### running ```cpp bool running ``` --- #### step ```cpp WII5GPS_MODES step ``` --- #### stepLast ```cpp WII5GPS_MODES stepLast ``` --- #### first ```cpp bool first ``` --- #### stepWait ```cpp elapsedMillis stepWait ``` --- #### minutes ```cpp uint8_t minutes ``` --- #### waitTime ```cpp elapsedMillis waitTime ``` --- #### runTime ```cpp elapsedMillis runTime ``` --- #### lastTime ```cpp elapsedMillis lastTime ``` ### Protected Methods | Return | Name | Description | |--------|------|-------------| | `void` | [`start`](#start) `virtual` | | | `void` | [`stop`](#stop) `virtual` | | --- #### start `virtual` ```cpp virtual void start(bool force) ``` --- #### stop `virtual` ```cpp virtual void stop(bool force) ``` ## WII5RTC ```cpp #include ``` ### Public Methods | Return | Name | Description | |--------|------|-------------| | | [`WII5RTC`](#wii5rtc-3) `inline` | | | `WII5_CONTROLLERS` | [`controllerId`](#controllerid-2) `virtual` `inline` | | | `WII5_DRIVERS` | [`driverId`](#driverid-2) `virtual` `inline` | | | `void` | [`begin`](#begin-1) | | | `void` | [`test`](#test) | | | `void` | [`setRTC`](#setrtc) | | | `float` | [`getTemperature`](#gettemperature) | | --- #### WII5RTC `inline` ```cpp inline WII5RTC() ``` --- #### controllerId `virtual` `inline` ```cpp virtual inline WII5_CONTROLLERS controllerId() ``` --- #### driverId `virtual` `inline` ```cpp virtual inline WII5_DRIVERS driverId() ``` --- #### begin ```cpp void begin() ``` --- #### test ```cpp void test() ``` --- #### setRTC ```cpp void setRTC(uint32_t t) ``` --- #### getTemperature ```cpp float getTemperature() ``` ### Protected Attributes | Return | Name | Description | |--------|------|-------------| | `bool` | [`testDone`](#testdone) | | --- #### testDone ```cpp bool testDone ``` ## WII5Help ```cpp #include ``` ### Public Methods | Return | Name | Description | |--------|------|-------------| | | [`WII5Help`](#wii5help-3) `inline` | | | `WII5_CONTROLLERS` | [`controllerId`](#controllerid-3) `virtual` `inline` | | | `bool` | [`processConsoleCsv`](#processconsolecsv) | | --- #### WII5Help `inline` ```cpp inline WII5Help() ``` --- #### controllerId `virtual` `inline` ```cpp virtual inline WII5_CONTROLLERS controllerId() ``` --- #### processConsoleCsv ```cpp bool processConsoleCsv() ``` ### Protected Methods | Return | Name | Description | |--------|------|-------------| | `bool` | [`displayIndex`](#displayindex) | | | `bool` | [`display404`](#display404) | | | `bool` | [`displayList`](#displaylist) | | | `bool` | [`displayInfo`](#displayinfo) | | | `bool` | [`displayGeneral`](#displaygeneral) | | | `bool` | [`displayMaths`](#displaymaths) | | | `bool` | [`displayHardware`](#displayhardware) | | | `bool` | [`displayData`](#displaydata) | | | `bool` | [`displayTesting`](#displaytesting) | | | `bool` | [`displayAdvanced`](#displayadvanced) | | | `bool` | [`displaySettings`](#displaysettings) | | | `bool` | [`displaySparton`](#displaysparton) | | | `bool` | [`displayIridium`](#displayiridium) | | | `bool` | [`displayGps`](#displaygps) | | | `bool` | [`displayStorage`](#displaystorage) | | --- #### displayIndex ```cpp bool displayIndex() ``` --- #### display404 ```cpp bool display404() ``` --- #### displayList ```cpp bool displayList() ``` --- #### displayInfo ```cpp bool displayInfo() ``` --- #### displayGeneral ```cpp bool displayGeneral() ``` --- #### displayMaths ```cpp bool displayMaths() ``` --- #### displayHardware ```cpp bool displayHardware() ``` --- #### displayData ```cpp bool displayData() ``` --- #### displayTesting ```cpp bool displayTesting() ``` --- #### displayAdvanced ```cpp bool displayAdvanced() ``` --- #### displaySettings ```cpp bool displaySettings() ``` --- #### displaySparton ```cpp bool displaySparton() ``` --- #### displayIridium ```cpp bool displayIridium() ``` --- #### displayGps ```cpp bool displayGps() ``` --- #### displayStorage ```cpp bool displayStorage() ``` ## WII5Mode ```cpp #include ``` > **Subclassed by:** [`WII5Communications`](#wii5communications-2), [`WII5ModeCapture`](#wii5modecapture-2), [`WII5ModeLowBattery`](#wii5modelowbattery-2), [`WII5ModeManualTest`](#wii5modemanualtest-2), [`WII5ModePosition`](#wii5modeposition-2), [`WII5ModeSelfTest`](#wii5modeselftest-2), [`WII5ModeSleep`](#wii5modesleep-2) Base class for run-time operating modes. Each subclass owns a small state machine that is ticked by [WII5Controller::loop()](#loop-9) while that mode is active. Concrete modes include [WII5ModeCapture](#wii5modecapture-2), [WII5ModeSleep](#wii5modesleep-2), [WII5ModePosition](#wii5modeposition-2), [WII5ModeManualTest](#wii5modemanualtest-2), [WII5ModeSelfTest](#wii5modeselftest-2), and [WII5ModeLowBattery](#wii5modelowbattery-2). ### Public Methods | Return | Name | Description | |--------|------|-------------| | `void` | [`begin`](#begin-2) `virtual` | One-time bring-up. | | `void` | [`loop`](#loop-1) `virtual` | State-machine tick while this mode is active. | --- #### begin `virtual` ```cpp virtual void begin() ``` One-time bring-up. --- #### loop `virtual` ```cpp virtual void loop() ``` State-machine tick while this mode is active. ### Protected Attributes | Return | Name | Description | |--------|------|-------------| | `elapsedMillis` | [`wait`](#wait) | | --- #### wait ```cpp elapsedMillis wait ``` ## WII5Maths ```cpp #include ``` > **Inherits:** [`WII5Power`](#wii5power) ### Public Attributes | Return | Name | Description | |--------|------|-------------| | `time_t` | [`lastStartTime`](#laststarttime) | | | `uint32_t` | [`lastRunTime`](#lastruntime-1) | | --- #### lastStartTime ```cpp time_t lastStartTime ``` --- #### lastRunTime ```cpp uint32_t lastRunTime ``` ### Public Methods | Return | Name | Description | |--------|------|-------------| | | [`WII5Maths`](#wii5maths-3) `inline` | | | `WII5_CONTROLLERS` | [`controllerId`](#controllerid-4) `virtual` `inline` | Identify the controller category for logging/status. | | `WII5_DRIVERS` | [`driverId`](#driverid-3) `virtual` `inline` | Identify the driver category for logging/status. | | `void` | [`setDebug`](#setdebug) | | | `bool` | [`getDebug`](#getdebug) | | | `void` | [`begin`](#begin-3) | | | `void` | [`loop`](#loop-2) | | | `void` | [`start`](#start-1) | | | `void` | [`stop`](#stop-1) | | | `void` | [`powerOff`](#poweroff) `virtual` | | | `void` | [`powerOn`](#poweron) `virtual` | | | `void` | [`setMathsUntil`](#setmathsuntil) | | | `time_t` | [`getMathsUntil`](#getmathsuntil) | | | `bool` | [`isRunning`](#isrunning-1) | | | `bool` | [`isOff`](#isoff) | | | `void` | [`gpioClick`](#gpioclick) | | | `void` | [`setHold`](#sethold) | | | `void` | [`woops_on`](#woops_on) | | | `void` | [`cancelHold`](#cancelhold) | | | `bool` | [`processHold`](#processhold) | | | `void` | [`setReturnLine`](#setreturnline) | | | `void` | [`cancelReturnLine`](#cancelreturnline) | | | `uint32_t` | [`remainingHold`](#remaininghold) | | | `uint32_t` | [`remainingUntil`](#remaininguntil) | | | `bool` | [`isMode`](#ismode) | | | `void` | [`sendTime`](#sendtime) | | | `void` | [`sendQueue`](#sendqueue) | | | `bool` | [`queueCommand`](#queuecommand) | | | `void` | [`queueDone`](#queuedone) | | --- #### WII5Maths `inline` ```cpp inline WII5Maths() ``` --- #### controllerId `virtual` `inline` ```cpp virtual inline WII5_CONTROLLERS controllerId() ``` Identify the controller category for logging/status. --- #### driverId `virtual` `inline` ```cpp virtual inline WII5_DRIVERS driverId() ``` Identify the driver category for logging/status. --- #### setDebug ```cpp void setDebug(bool in) ``` --- #### getDebug ```cpp bool getDebug() ``` --- #### begin ```cpp void begin() ``` --- #### loop ```cpp void loop() ``` --- #### start ```cpp void start(WII5_MATHSMODE mm) ``` --- #### stop ```cpp void stop(bool force) ``` --- #### powerOff `virtual` ```cpp virtual void powerOff(bool force) ``` --- #### powerOn `virtual` ```cpp virtual void powerOn(bool force) ``` --- #### setMathsUntil ```cpp void setMathsUntil(time_t t) ``` --- #### getMathsUntil ```cpp time_t getMathsUntil() ``` --- #### isRunning ```cpp bool isRunning() ``` --- #### isOff ```cpp bool isOff() ``` --- #### gpioClick ```cpp void gpioClick() ``` --- #### setHold ```cpp void setHold(uint32_t in, bool allowLower) ``` --- #### woops_on ```cpp void woops_on() ``` --- #### cancelHold ```cpp void cancelHold() ``` --- #### processHold ```cpp bool processHold() ``` --- #### setReturnLine ```cpp void setReturnLine() ``` --- #### cancelReturnLine ```cpp void cancelReturnLine() ``` --- #### remainingHold ```cpp uint32_t remainingHold() ``` --- #### remainingUntil ```cpp uint32_t remainingUntil() ``` --- #### isMode ```cpp bool isMode(WII5_MATHSMODE mm) ``` --- #### sendTime ```cpp void sendTime() ``` --- #### sendQueue ```cpp void sendQueue() ``` --- #### queueCommand ```cpp bool queueCommand(char * val, uint8_t valSize) ``` --- #### queueDone ```cpp void queueDone() ``` ### Protected Attributes | Return | Name | Description | |--------|------|-------------| | `uint8_t` | [`queueCount`](#queuecount) | | | `char` | [`queueMessage`](#queuemessage) | | | `elapsedMillis` | [`queueLast`](#queuelast) | | | `uint8_t` | [`queueRetry`](#queueretry) | | | `bool` | [`running`](#running-1) | | | `bool` | [`debug`](#debug) | | | `WII5_MATHSMODE` | [`mathsMode`](#mathsmode) | | | `uint8_t` | [`retry`](#retry) | | | `bool` | [`firstboot`](#firstboot-1) | | | `time_t` | [`mathsUntil`](#mathsuntil) | | | `elapsedMillis` | [`returnlineWait`](#returnlinewait) | | | `elapsedMillis` | [`holdWait`](#holdwait) | | | `uint32_t` | [`holdFor`](#holdfor) | | | `WII5MATHS_STEPS` | [`step`](#step-1) | | | `WII5MATHS_STEPS` | [`stepLast`](#steplast-1) | | | `elapsedMillis` | [`stepWait`](#stepwait-1) | | | `elapsedMillis` | [`displayWait`](#displaywait) | | | `elapsedMillis` | [`timeWait`](#timewait) | | --- #### queueCount ```cpp uint8_t queueCount ``` --- #### queueMessage ```cpp char queueMessage ``` --- #### queueLast ```cpp elapsedMillis queueLast ``` --- #### queueRetry ```cpp uint8_t queueRetry ``` --- #### running ```cpp bool running ``` --- #### debug ```cpp bool debug ``` --- #### mathsMode ```cpp WII5_MATHSMODE mathsMode ``` --- #### retry ```cpp uint8_t retry ``` --- #### firstboot ```cpp bool firstboot ``` --- #### mathsUntil ```cpp time_t mathsUntil ``` --- #### returnlineWait ```cpp elapsedMillis returnlineWait ``` --- #### holdWait ```cpp elapsedMillis holdWait ``` --- #### holdFor ```cpp uint32_t holdFor ``` --- #### step ```cpp WII5MATHS_STEPS step ``` --- #### stepLast ```cpp WII5MATHS_STEPS stepLast ``` --- #### stepWait ```cpp elapsedMillis stepWait ``` --- #### displayWait ```cpp elapsedMillis displayWait ``` --- #### timeWait ```cpp elapsedMillis timeWait ``` ## WII5Power ```cpp #include ``` > **Inherits:** [`WII5`](#wii5) > **Subclassed by:** [`WII5Battery`](#wii5battery-2), [`WII5GPS`](#wii5gps-2), [`WII5Iridium`](#wii5iridium-2), [`WII5Maths`](#wii5maths-2), [`WII5Sparton`](#wii5sparton-2), [`WII5Weather_18B20`](#wii5weather_18b20-2) ### Public Methods | Return | Name | Description | |--------|------|-------------| | | [`WII5Power`](#wii5power-1) `inline` | | | `WII5_DRIVERS` | [`driverId`](#driverid-4) `virtual` `inline` | Identify the driver category for logging/status. | | `void` | [`powerSetPin`](#powersetpin) | | | `void` | [`powerSetShared`](#powersetshared) | | | `void` | [`powerOn`](#poweron-1) `virtual` | | | `void` | [`powerOff`](#poweroff-1) `virtual` | | | `void` | [`powerInput`](#powerinput) `virtual` | | | `bool` | [`powerStatus`](#powerstatus) | | | `uint32_t` | [`powerLast`](#powerlast) | | | `uint32_t` | [`powerElapsed`](#powerelapsed) | | | `uint32_t` | [`powerLastTotal`](#powerlasttotal) | | --- #### WII5Power `inline` ```cpp inline WII5Power() ``` --- #### driverId `virtual` `inline` ```cpp virtual inline WII5_DRIVERS driverId() ``` Identify the driver category for logging/status. --- #### powerSetPin ```cpp void powerSetPin(uint8_t p, bool onHigh, uint8_t pOff, uint8_t pulse) ``` --- #### powerSetShared ```cpp void powerSetShared(WII5Power * s) ``` --- #### powerOn `virtual` ```cpp virtual void powerOn(bool force) ``` --- #### powerOff `virtual` ```cpp virtual void powerOff(bool force) ``` --- #### powerInput `virtual` ```cpp virtual void powerInput() ``` --- #### powerStatus ```cpp bool powerStatus() ``` --- #### powerLast ```cpp uint32_t powerLast() ``` --- #### powerElapsed ```cpp uint32_t powerElapsed() ``` --- #### powerLastTotal ```cpp uint32_t powerLastTotal() ``` ### Protected Attributes | Return | Name | Description | |--------|------|-------------| | `uint8_t` | [`powerData_Pin`](#powerdata_pin) | | | `uint8_t` | [`powerData_PinOff`](#powerdata_pinoff) | | | `uint8_t` | [`powerData_Pulse`](#powerdata_pulse) | | | `bool` | [`powerData_OnIsHigh`](#powerdata_onishigh) | | | `WII5Power *` | [`powerData_Shared`](#powerdata_shared) | | | `bool` | [`powerData_On`](#powerdata_on) | | | `bool` | [`powerData_Input`](#powerdata_input) | | | `elapsedMillis` | [`powerData_Elapsed`](#powerdata_elapsed) | | | `time_t` | [`powerData_Last`](#powerdata_last) | | | `uint32_t` | [`powerData_LastTotal`](#powerdata_lasttotal) | | --- #### powerData_Pin ```cpp uint8_t powerData_Pin ``` --- #### powerData_PinOff ```cpp uint8_t powerData_PinOff ``` --- #### powerData_Pulse ```cpp uint8_t powerData_Pulse ``` --- #### powerData_OnIsHigh ```cpp bool powerData_OnIsHigh ``` --- #### powerData_Shared ```cpp WII5Power * powerData_Shared ``` --- #### powerData_On ```cpp bool powerData_On ``` --- #### powerData_Input ```cpp bool powerData_Input ``` --- #### powerData_Elapsed ```cpp elapsedMillis powerData_Elapsed ``` --- #### powerData_Last ```cpp time_t powerData_Last ``` --- #### powerData_LastTotal ```cpp uint32_t powerData_LastTotal ``` ## WII5Setup ```cpp #include ``` > **Inherits:** [`WII5`](#wii5) ### Public Methods | Return | Name | Description | |--------|------|-------------| | `WII5_CONTROLLERS` | [`controllerId`](#controllerid-5) `virtual` `inline` | Identify the controller category for logging/status. | | `void` | [`begin`](#begin-4) | | | `void` | [`beginSafe`](#beginsafe) | | | `void` | [`bootbeep`](#bootbeep) | | | `void` | [`shutdownbeep`](#shutdownbeep) | | | `void` | [`setupPower`](#setuppower) | | | `void` | [`setupConsole`](#setupconsole) | | | `void` | [`setupNetwork`](#setupnetwork) | | | `void` | [`setupIO`](#setupio) | | | `void` | [`setupWII5`](#setupwii5) | | | `void` | [`sleepBefore`](#sleepbefore) | | | `void` | [`sleepAfter`](#sleepafter) | | --- #### controllerId `virtual` `inline` ```cpp virtual inline WII5_CONTROLLERS controllerId() ``` Identify the controller category for logging/status. --- #### begin ```cpp void begin() ``` --- #### beginSafe ```cpp void beginSafe() ``` --- #### bootbeep ```cpp void bootbeep() ``` --- #### shutdownbeep ```cpp void shutdownbeep() ``` --- #### setupPower ```cpp void setupPower() ``` --- #### setupConsole ```cpp void setupConsole() ``` --- #### setupNetwork ```cpp void setupNetwork() ``` --- #### setupIO ```cpp void setupIO() ``` --- #### setupWII5 ```cpp void setupWII5() ``` --- #### sleepBefore ```cpp void sleepBefore(bool mathsOn) ``` --- #### sleepAfter ```cpp void sleepAfter() ``` ### Protected Attributes | Return | Name | Description | |--------|------|-------------| | `bool` | [`_setupPower`](#_setuppower) | | | `bool` | [`_setupIO`](#_setupio) | | | `bool` | [`_setupWII5`](#_setupwii5) | | | `bool` | [`_setupConsole`](#_setupconsole) | | | `bool` | [`_setupNetwork`](#_setupnetwork) | | --- #### _setupPower ```cpp bool _setupPower ``` --- #### _setupIO ```cpp bool _setupIO ``` --- #### _setupWII5 ```cpp bool _setupWII5 ``` --- #### _setupConsole ```cpp bool _setupConsole ``` --- #### _setupNetwork ```cpp bool _setupNetwork ``` ## WII5Config ```cpp #include ``` ### Public Methods | Return | Name | Description | |--------|------|-------------| | | [`WII5Config`](#wii5config-3) `inline` | | | `WII5_CONTROLLERS` | [`controllerId`](#controllerid-6) `virtual` `inline` | | | `void` | [`begin`](#begin-5) | | | `uint32_t` | [`getDeviceId`](#getdeviceid) | | | `void` | [`setDeviceId`](#setdeviceid) | | | `bool` | [`_checkMode`](#_checkmode) | | | `void` | [`setDefaultMode`](#setdefaultmode) | | | `WII5_MODES` | [`getDefaultMode`](#getdefaultmode) | | | `void` | [`setTemporaryMode`](#settemporarymode) | | | `WII5_MODES` | [`getTemporaryMode`](#gettemporarymode) | | | `void` | [`setCapturePeriod`](#setcaptureperiod) | | | `uint32_t` | [`getCapturePeriod`](#getcaptureperiod) | | | `void` | [`setCaptureRecords`](#setcapturerecords) | | | `uint32_t` | [`getCaptureRecords`](#getcapturerecords) | | | `void` | [`setCaptureBinaryType`](#setcapturebinarytype) | | | `uint32_t` | [`getCaptureBinaryType`](#getcapturebinarytype) | | | `void` | [`setPositionPeriod`](#setpositionperiod) | | | `uint32_t` | [`getPositionPeriod`](#getpositionperiod) | | | `void` | [`setPositionBinaryType`](#setpositionbinarytype) | | | `uint32_t` | [`getPositionBinaryType`](#getpositionbinarytype) | | | `void` | [`setSleepBinaryType`](#setsleepbinarytype) | | | `uint32_t` | [`getSleepBinaryType`](#getsleepbinarytype) | | | `void` | [`setSleepPeriod`](#setsleepperiod) | | | `uint32_t` | [`getSleepPeriod`](#getsleepperiod) | | | `void` | [`setSleepUntil`](#setsleepuntil) | | | `uint32_t` | [`getSleepUntil`](#getsleepuntil) | | | `void` | [`setDisableLowBattery`](#setdisablelowbattery) | | | `time_t` | [`getDisableLowBattery`](#getdisablelowbattery) | | | `uint32_t` | [`updateRecordCount`](#updaterecordcount) | | | `uint32_t` | [`getRecordCount`](#getrecordcount) | | | `void` | [`resetCounters`](#resetcounters) | | | `void` | [`readConfigData`](#readconfigdata) | | | `void` | [`updateConfigData`](#updateconfigdata) | | | `void` | [`resetConfigData`](#resetconfigdata) | | | `void` | [`readStatusData`](#readstatusdata) | | | `void` | [`updateStatusData`](#updatestatusdata) | | | `void` | [`resetStatusData`](#resetstatusdata) | | | `bool` | [`getFlag`](#getflag) | | | `void` | [`setFlag`](#setflag) | | | `uint32_t` | [`getGpsTimeout`](#getgpstimeout) | | | `void` | [`setGpsTimeout`](#setgpstimeout) | | | `void` | [`dump`](#dump-1) | | | `uint16_t` | [`getBatteryLow`](#getbatterylow) | | | `void` | [`setBatteryLow`](#setbatterylow) | | | `uint16_t` | [`getBatteryMid`](#getbatterymid) | | | `void` | [`setBatteryMid`](#setbatterymid) | | --- #### WII5Config `inline` ```cpp inline WII5Config() ``` --- #### controllerId `virtual` `inline` ```cpp virtual inline WII5_CONTROLLERS controllerId() ``` --- #### begin ```cpp void begin() ``` --- #### getDeviceId ```cpp uint32_t getDeviceId() ``` --- #### setDeviceId ```cpp void setDeviceId(uint32_t newId) ``` --- #### _checkMode ```cpp bool _checkMode(WII5_MODES newMode, uint32_t v1, uint32_t v2, uint32_t v3, uint32_t v4) ``` --- #### setDefaultMode ```cpp void setDefaultMode(WII5_MODES newMode) ``` --- #### getDefaultMode ```cpp WII5_MODES getDefaultMode() ``` --- #### setTemporaryMode ```cpp void setTemporaryMode(time_t exp, WII5_MODES newMode) ``` --- #### getTemporaryMode ```cpp WII5_MODES getTemporaryMode() ``` --- #### setCapturePeriod ```cpp void setCapturePeriod(uint32_t in) ``` --- #### getCapturePeriod ```cpp uint32_t getCapturePeriod() ``` --- #### setCaptureRecords ```cpp void setCaptureRecords(uint32_t in) ``` --- #### getCaptureRecords ```cpp uint32_t getCaptureRecords() ``` --- #### setCaptureBinaryType ```cpp void setCaptureBinaryType(uint32_t in) ``` --- #### getCaptureBinaryType ```cpp uint32_t getCaptureBinaryType() ``` --- #### setPositionPeriod ```cpp void setPositionPeriod(uint32_t in) ``` --- #### getPositionPeriod ```cpp uint32_t getPositionPeriod() ``` --- #### setPositionBinaryType ```cpp void setPositionBinaryType(uint32_t in) ``` --- #### getPositionBinaryType ```cpp uint32_t getPositionBinaryType() ``` --- #### setSleepBinaryType ```cpp void setSleepBinaryType(uint32_t in) ``` --- #### getSleepBinaryType ```cpp uint32_t getSleepBinaryType() ``` --- #### setSleepPeriod ```cpp void setSleepPeriod(uint32_t in) ``` --- #### getSleepPeriod ```cpp uint32_t getSleepPeriod() ``` --- #### setSleepUntil ```cpp void setSleepUntil(uint32_t in) ``` --- #### getSleepUntil ```cpp uint32_t getSleepUntil() ``` --- #### setDisableLowBattery ```cpp void setDisableLowBattery(time_t exp) ``` --- #### getDisableLowBattery ```cpp time_t getDisableLowBattery() ``` --- #### updateRecordCount ```cpp uint32_t updateRecordCount() ``` --- #### getRecordCount ```cpp uint32_t getRecordCount() ``` --- #### resetCounters ```cpp void resetCounters() ``` --- #### readConfigData ```cpp void readConfigData() ``` --- #### updateConfigData ```cpp void updateConfigData() ``` --- #### resetConfigData ```cpp void resetConfigData() ``` --- #### readStatusData ```cpp void readStatusData() ``` --- #### updateStatusData ```cpp void updateStatusData() ``` --- #### resetStatusData ```cpp void resetStatusData() ``` --- #### getFlag ```cpp bool getFlag(WII5_FLAGS f) ``` --- #### setFlag ```cpp void setFlag(WII5_FLAGS f, bool state) ``` --- #### getGpsTimeout ```cpp uint32_t getGpsTimeout() ``` --- #### setGpsTimeout ```cpp void setGpsTimeout(uint32_t t) ``` --- #### dump ```cpp void dump(bool toConsole, Print * toOther) ``` --- #### getBatteryLow ```cpp uint16_t getBatteryLow() ``` --- #### setBatteryLow ```cpp void setBatteryLow(uint16_t in) ``` --- #### getBatteryMid ```cpp uint16_t getBatteryMid() ``` --- #### setBatteryMid ```cpp void setBatteryMid(uint16_t in) ``` ### Protected Attributes | Return | Name | Description | |--------|------|-------------| | `uint32_t` | [`_deviceId`](#_deviceid) | | | `WII5_Data_Config` | [`configData`](#configdata) | | | `WII5_Data_Config` | [`statusData`](#statusdata) | | --- #### _deviceId ```cpp uint32_t _deviceId ``` --- #### configData ```cpp WII5_Data_Config configData ``` --- #### statusData ```cpp WII5_Data_Config statusData ``` ## WII5Sh3dIO ```cpp #include ``` ### Public Attributes | Return | Name | Description | |--------|------|-------------| | `PushButton *` | [`button1`](#button1) | | | `PushButton *` | [`button2`](#button2) | | | `PushButton *` | [`button3`](#button3) | | | `PushButton *` | [`button4`](#button4) | | --- #### button1 ```cpp PushButton * button1 ``` --- #### button2 ```cpp PushButton * button2 ``` --- #### button3 ```cpp PushButton * button3 ``` --- #### button4 ```cpp PushButton * button4 ``` ### Public Methods | Return | Name | Description | |--------|------|-------------| | `void` | [`preButton`](#prebutton) | | | `void` | [`begin`](#begin-6) | | | `void` | [`begin`](#begin-7) | | | `void` | [`loop`](#loop-3) | | | `void` | [`led1Set`](#led1set) `inline` | | | `void` | [`led1SetTimeout`](#led1settimeout) `inline` | | | `void` | [`led1SetDefault`](#led1setdefault) `inline` | | | `uint8_t` | [`led1Get`](#led1get) `inline` | | | `void` | [`led2Set`](#led2set) `inline` | | | `void` | [`led2SetTimeout`](#led2settimeout) `inline` | | | `void` | [`led2SetDefault`](#led2setdefault) `inline` | | | `uint8_t` | [`led2Get`](#led2get) `inline` | | | `void` | [`led3Set`](#led3set) `inline` | | | `void` | [`led3SetTimeout`](#led3settimeout) `inline` | | | `void` | [`led3SetDefault`](#led3setdefault) `inline` | | | `uint8_t` | [`led3Get`](#led3get) `inline` | | | `void` | [`led4Set`](#led4set) `inline` | | | `void` | [`led4SetTimeout`](#led4settimeout) `inline` | | | `void` | [`led4SetDefault`](#led4setdefault) `inline` | | | `uint8_t` | [`led4Get`](#led4get) `inline` | | | `uint8_t` | [`buttonSleepCheck`](#buttonsleepcheck) | | | `void` | [`sleep`](#sleep) | | | `void` | [`wake`](#wake) | | --- #### preButton ```cpp void preButton(PushButton * btn1, PushButton * btn2, PushButton * btn3, PushButton * btn4) ``` --- #### begin ```cpp void begin(uint8_t led1, uint8_t led2, uint8_t btn1, uint8_t btn2) ``` --- #### begin ```cpp 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 ```cpp void loop() ``` --- #### led1Set `inline` ```cpp inline void led1Set(uint8_t m) ``` --- #### led1SetTimeout `inline` ```cpp inline void led1SetTimeout(uint32_t m) ``` --- #### led1SetDefault `inline` ```cpp inline void led1SetDefault(uint8_t m) ``` --- #### led1Get `inline` ```cpp inline uint8_t led1Get() ``` --- #### led2Set `inline` ```cpp inline void led2Set(uint8_t m) ``` --- #### led2SetTimeout `inline` ```cpp inline void led2SetTimeout(uint32_t m) ``` --- #### led2SetDefault `inline` ```cpp inline void led2SetDefault(uint8_t m) ``` --- #### led2Get `inline` ```cpp inline uint8_t led2Get() ``` --- #### led3Set `inline` ```cpp inline void led3Set(uint8_t m) ``` --- #### led3SetTimeout `inline` ```cpp inline void led3SetTimeout(uint32_t m) ``` --- #### led3SetDefault `inline` ```cpp inline void led3SetDefault(uint8_t m) ``` --- #### led3Get `inline` ```cpp inline uint8_t led3Get() ``` --- #### led4Set `inline` ```cpp inline void led4Set(uint8_t m) ``` --- #### led4SetTimeout `inline` ```cpp inline void led4SetTimeout(uint32_t m) ``` --- #### led4SetDefault `inline` ```cpp inline void led4SetDefault(uint8_t m) ``` --- #### led4Get `inline` ```cpp inline uint8_t led4Get() ``` --- #### buttonSleepCheck ```cpp uint8_t buttonSleepCheck() ``` --- #### sleep ```cpp void sleep() ``` --- #### wake ```cpp void wake() ``` ### Protected Attributes | Return | Name | Description | |--------|------|-------------| | `elapsedMillis` | [`lastLedLoop`](#lastledloop) | | | `uint8_t` | [`validPacketType`](#validpackettype) | | | `bool` | [`_begin`](#_begin) | | | `uint16_t` | [`battery_voltage`](#battery_voltage) | | | `uint8_t` | [`led1_pin`](#led1_pin) | | | `bool` | [`led1_activelow`](#led1_activelow) | | | `uint8_t` | [`led1_mode`](#led1_mode) | | | `uint8_t` | [`led1_default`](#led1_default) | | | `uint8_t` | [`led1_state`](#led1_state) | | | `elapsedMillis` | [`led1_timeon`](#led1_timeon) | | | `uint32_t` | [`led1_max`](#led1_max) | | | `uint8_t` | [`led2_pin`](#led2_pin) | | | `bool` | [`led2_activelow`](#led2_activelow) | | | `uint8_t` | [`led2_mode`](#led2_mode) | | | `uint8_t` | [`led2_default`](#led2_default) | | | `uint8_t` | [`led2_state`](#led2_state) | | | `elapsedMillis` | [`led2_timeon`](#led2_timeon) | | | `uint32_t` | [`led2_max`](#led2_max) | | | `uint8_t` | [`led3_pin`](#led3_pin) | | | `uint8_t` | [`led3_mode`](#led3_mode) | | | `uint8_t` | [`led3_default`](#led3_default) | | | `uint8_t` | [`led3_state`](#led3_state) | | | `elapsedMillis` | [`led3_timeon`](#led3_timeon) | | | `uint32_t` | [`led3_max`](#led3_max) | | | `uint8_t` | [`led4_pin`](#led4_pin) | | | `uint8_t` | [`led4_mode`](#led4_mode) | | | `uint8_t` | [`led4_default`](#led4_default) | | | `uint8_t` | [`led4_state`](#led4_state) | | | `elapsedMillis` | [`led4_timeon`](#led4_timeon) | | | `uint32_t` | [`led4_max`](#led4_max) | | | `uint8_t` | [`button1_pin`](#button1_pin) | | | `bool` | [`button1_activelow`](#button1_activelow) | | | `uint8_t` | [`button2_pin`](#button2_pin) | | | `bool` | [`button2_activelow`](#button2_activelow) | | | `uint8_t` | [`button3_pin`](#button3_pin) | | | `bool` | [`button3_activelow`](#button3_activelow) | | | `uint8_t` | [`button4_pin`](#button4_pin) | | | `bool` | [`button4_activelow`](#button4_activelow) | | --- #### lastLedLoop ```cpp elapsedMillis lastLedLoop ``` --- #### validPacketType ```cpp uint8_t validPacketType ``` --- #### _begin ```cpp bool _begin ``` --- #### battery_voltage ```cpp uint16_t battery_voltage ``` --- #### led1_pin ```cpp uint8_t led1_pin ``` --- #### led1_activelow ```cpp bool led1_activelow ``` --- #### led1_mode ```cpp uint8_t led1_mode ``` --- #### led1_default ```cpp uint8_t led1_default ``` --- #### led1_state ```cpp uint8_t led1_state ``` --- #### led1_timeon ```cpp elapsedMillis led1_timeon ``` --- #### led1_max ```cpp uint32_t led1_max ``` --- #### led2_pin ```cpp uint8_t led2_pin ``` --- #### led2_activelow ```cpp bool led2_activelow ``` --- #### led2_mode ```cpp uint8_t led2_mode ``` --- #### led2_default ```cpp uint8_t led2_default ``` --- #### led2_state ```cpp uint8_t led2_state ``` --- #### led2_timeon ```cpp elapsedMillis led2_timeon ``` --- #### led2_max ```cpp uint32_t led2_max ``` --- #### led3_pin ```cpp uint8_t led3_pin ``` --- #### led3_mode ```cpp uint8_t led3_mode ``` --- #### led3_default ```cpp uint8_t led3_default ``` --- #### led3_state ```cpp uint8_t led3_state ``` --- #### led3_timeon ```cpp elapsedMillis led3_timeon ``` --- #### led3_max ```cpp uint32_t led3_max ``` --- #### led4_pin ```cpp uint8_t led4_pin ``` --- #### led4_mode ```cpp uint8_t led4_mode ``` --- #### led4_default ```cpp uint8_t led4_default ``` --- #### led4_state ```cpp uint8_t led4_state ``` --- #### led4_timeon ```cpp elapsedMillis led4_timeon ``` --- #### led4_max ```cpp uint32_t led4_max ``` --- #### button1_pin ```cpp uint8_t button1_pin ``` --- #### button1_activelow ```cpp bool button1_activelow ``` --- #### button2_pin ```cpp uint8_t button2_pin ``` --- #### button2_activelow ```cpp bool button2_activelow ``` --- #### button3_pin ```cpp uint8_t button3_pin ``` --- #### button3_activelow ```cpp bool button3_activelow ``` --- #### button4_pin ```cpp uint8_t button4_pin ``` --- #### button4_activelow ```cpp bool button4_activelow ``` ### Protected Methods | Return | Name | Description | |--------|------|-------------| | `bool` | [`updateLED`](#updateled) | | --- #### updateLED ```cpp bool updateLED(uint8_t pin, uint8_t mode, uint8_t state) ``` ## WII5Battery ```cpp #include ``` > **Inherits:** [`WII5Power`](#wii5power) ### Public Attributes | Return | Name | Description | |--------|------|-------------| | `elapsedMillis` | [`age`](#age) | | | `int32_t` | [`value`](#value) | | --- #### age ```cpp elapsedMillis age ``` --- #### value ```cpp int32_t value ``` ### Public Methods | Return | Name | Description | |--------|------|-------------| | | [`WII5Battery`](#wii5battery-3) `inline` | | | `WII5_CONTROLLERS` | [`controllerId`](#controllerid-7) `virtual` `inline` | Identify the controller category for logging/status. | | `WII5_DRIVERS` | [`driverId`](#driverid-5) `virtual` `inline` | Identify the driver category for logging/status. | | `void` | [`begin`](#begin-8) | | | `void` | [`loop`](#loop-4) | | | `void` | [`start`](#start-2) | | | `void` | [`stop`](#stop-2) | | | `bool` | [`isRunning`](#isrunning-2) | | --- #### WII5Battery `inline` ```cpp inline WII5Battery() ``` --- #### controllerId `virtual` `inline` ```cpp virtual inline WII5_CONTROLLERS controllerId() ``` Identify the controller category for logging/status. --- #### driverId `virtual` `inline` ```cpp virtual inline WII5_DRIVERS driverId() ``` Identify the driver category for logging/status. --- #### begin ```cpp void begin() ``` --- #### loop ```cpp void loop() ``` --- #### start ```cpp void start(bool force) ``` --- #### stop ```cpp void stop(bool force) ``` --- #### isRunning ```cpp bool isRunning() ``` ### Protected Attributes | Return | Name | Description | |--------|------|-------------| | `WII5BATTERY_STEPS` | [`step`](#step-2) | | | `elapsedMillis` | [`stepWait`](#stepwait-2) | | | `uint32_t` | [`stepCount`](#stepcount) | | | `AvgStd` | [`avgBattery1`](#avgbattery1) | | | `AvgStd` | [`avgBattery2`](#avgbattery2) | | --- #### step ```cpp WII5BATTERY_STEPS step ``` --- #### stepWait ```cpp elapsedMillis stepWait ``` --- #### stepCount ```cpp uint32_t stepCount ``` --- #### avgBattery1 ```cpp AvgStd avgBattery1 ``` --- #### avgBattery2 ```cpp AvgStd avgBattery2 ``` ### Protected Methods | Return | Name | Description | |--------|------|-------------| | `uint16_t` | [`scale`](#scale) | | | `uint32_t` | [`scale`](#scale-1) | | --- #### scale ```cpp uint16_t scale(uint16_t data, uint16_t d) ``` --- #### scale ```cpp uint32_t scale(uint32_t data, uint32_t d) ``` ## WII5BinData ```cpp #include ``` Binary message format for Iridium SBD. Each SBD message starts with a [WII5_BINDATA_HEADER](#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](#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`](#wii5bindata-3) `inline` | | | `void` | [`begin`](#begin-9) | One-time bring-up. | | `bool` | [`getSplit`](#getsplit) | Pop the next chunk that fits in `max_size` bytes; advances start_bit. | | `uint16_t` | [`getSizeOne`](#getsizeone) | Size of a single payload struct selected by bit `b`. | | `uint16_t` | [`setBit`](#setbit-1) | Set bit `b` in `t` and return the modified value. | | `uint16_t` | [`getSize`](#getsize) | Total wire size for a type bitmap, including the header. | | `uint16_t` | [`getSizeObj`](#getsizeobj) | Total payload size for a type bitmap, excluding the header. | | `bool` | [`createData`](#createdata) | Initialize a binary buffer with header for type `t`. | | `bool` | [`setData`](#setdata) | Fill the payload structs in `buf` from live device state. | | `bool` | [`setBlockMetadata`](#setblockmetadata) | Fill the payload structs from a pre-loaded SD metadata block. | | `bool` | [`setBlockResults`](#setblockresults) | Fill the payload structs from a pre-loaded SD results (processed) block. | | `void` | [`dumpData`](#dumpdata) | Print a human-readable dump of the buffer to the console. | | `void` | [`showSizes`](#showsizes) | Print the size of every BinData payload type. | | `void` | [`showSplit`](#showsplit) | Print the split sequence for a given type bitmap. | | `char *` | [`strTitle`](#strtitle) | Human-readable title for payload bit `bit`. | | `bool` | [`hasType`](#hastype) | Does this buffer's header type-bitmap include bit `bit`? | | `void *` | [`getData`](#getdata) | Pointer to the payload struct for bit `bit` inside `buf`. | | `WII5_BINDATA_3 *` | [`getCommand`](#getcommand) | Validate header and return pointer to the embedded command struct. | | `void` | [`showBlocks`](#showblocks) | Print the list of bits set in a type bitmap. | --- #### WII5BinData `inline` ```cpp inline WII5BinData() ``` --- #### begin ```cpp void begin() ``` One-time bring-up. --- #### getSplit ```cpp 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 ```cpp uint16_t getSizeOne(uint8_t b) ``` Size of a single payload struct selected by bit `b`. --- #### setBit ```cpp uint16_t setBit(uint32_t t, uint8_t b) ``` Set bit `b` in `t` and return the modified value. --- #### getSize ```cpp uint16_t getSize(uint32_t t) ``` Total wire size for a type bitmap, including the header. --- #### getSizeObj ```cpp uint16_t getSizeObj(uint32_t t) ``` Total payload size for a type bitmap, excluding the header. --- #### createData ```cpp bool createData(uint32_t t, void * buf, uint16_t maxSize, uint32_t recordCount) ``` Initialize a binary buffer with header for type `t`. --- #### setData ```cpp bool setData(uint32_t t, void * buf, uint16_t maxSize) ``` Fill the payload structs in `buf` from live device state. --- #### setBlockMetadata ```cpp bool setBlockMetadata(uint32_t t, void * buf, uint16_t maxSize, WII5MetaDataObject * metadata) ``` Fill the payload structs from a pre-loaded SD metadata block. --- #### setBlockResults ```cpp 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 ```cpp void dumpData(void * buf, uint16_t maxSize, bool values) ``` Print a human-readable dump of the buffer to the console. --- #### showSizes ```cpp void showSizes(char * bufout, uint16_t bufsize) ``` Print the size of every BinData payload type. --- #### showSplit ```cpp 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 ```cpp char * strTitle(uint8_t bit, bool ext) ``` Human-readable title for payload bit `bit`. --- #### hasType ```cpp bool hasType(uint8_t bit, void * buf, uint16_t maxSize) ``` Does this buffer's header type-bitmap include bit `bit`? --- #### getData ```cpp void * getData(uint8_t bit, void * buf, uint16_t maxSize) ``` Pointer to the payload struct for bit `bit` inside `buf`. --- #### getCommand ```cpp WII5_BINDATA_3 * getCommand(void * buf, uint16_t maxSize) ``` Validate header and return pointer to the embedded command struct. --- #### showBlocks ```cpp void showBlocks(uint32_t t) ``` Print the list of bits set in a type bitmap. ### Protected Attributes | Return | Name | Description | |--------|------|-------------| | `bool` | [`testDone`](#testdone-1) | | --- #### testDone ```cpp bool testDone ``` ## WII5Display ```cpp #include ``` ### Public Methods | Return | Name | Description | |--------|------|-------------| | | [`WII5Display`](#wii5display-3) `inline` | | | `WII5_CONTROLLERS` | [`controllerId`](#controllerid-8) `virtual` `inline` | | | `void` | [`dumpPins`](#dumppins) | | | `void` | [`statusSend`](#statussend) | | | `uint32_t` | [`minutesUntilNext`](#minutesuntilnext) | | | `void` | [`atMathsSend`](#atmathssend) | | | `void` | [`atDataSend`](#atdatasend) | | | `void` | [`atStatsSend`](#atstatssend) | | | `void` | [`atCommandSend`](#atcommandsend) | | | `void` | [`atCommsSend`](#atcommssend) | | | `void` | [`updateMetadata`](#updatemetadata) | | | `void` | [`printMetadata`](#printmetadata) | | | `void` | [`printMetadataBlock`](#printmetadatablock) | | | `void` | [`sdBlockView`](#sdblockview) | | --- #### WII5Display `inline` ```cpp inline WII5Display() ``` --- #### controllerId `virtual` `inline` ```cpp virtual inline WII5_CONTROLLERS controllerId() ``` --- #### dumpPins ```cpp void dumpPins() ``` --- #### statusSend ```cpp void statusSend(const __FlashStringHelper * area, const __FlashStringHelper * out, ...) ``` --- #### minutesUntilNext ```cpp uint32_t minutesUntilNext(uint32_t period) ``` --- #### atMathsSend ```cpp void atMathsSend(const __FlashStringHelper * area, const __FlashStringHelper * out, ...) ``` --- #### atDataSend ```cpp void atDataSend(const __FlashStringHelper * area, const __FlashStringHelper * out, ...) ``` --- #### atStatsSend ```cpp void atStatsSend(const __FlashStringHelper * area, const __FlashStringHelper * out, ...) ``` --- #### atCommandSend ```cpp void atCommandSend(const __FlashStringHelper * area, const __FlashStringHelper * out, ...) ``` --- #### atCommsSend ```cpp void atCommsSend(const __FlashStringHelper * area, const __FlashStringHelper * out, ...) ``` --- #### updateMetadata ```cpp void updateMetadata(void * ref) ``` --- #### printMetadata ```cpp void printMetadata() ``` --- #### printMetadataBlock ```cpp void printMetadataBlock(WII5MetaDataObject * metadata) ``` --- #### sdBlockView ```cpp void sdBlockView(uint32_t block, bool view_md, bool view_raw) ``` ### Protected Attributes | Return | Name | Description | |--------|------|-------------| | `WII5MetaDataObject *` | [`metadata`](#metadata) | | --- #### metadata ```cpp WII5MetaDataObject * metadata ``` ## WII5Iridium ```cpp #include ``` > **Inherits:** [`WII5Power`](#wii5power), [`WII5SerialManager`](#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`](#imei) | | | `elapsedMillis` | [`lastSince`](#lastsince) | | | `uint8_t` | [`lastSignalQuality`](#lastsignalquality) | | | `uint16_t` | [`lastMOMSN`](#lastmomsn) | | | `WII5IRIDIUM_SEND_RESULT` | [`lastSend`](#lastsend) | | | `WII5IRIDIUM_RECEIVE_RESULT` | [`lastReceive`](#lastreceive) | | | `uint16_t` | [`lastReceiveLen`](#lastreceivelen) | | | `uint8_t *` | [`lastReceiveBuff`](#lastreceivebuff) | | --- #### imei ```cpp char imei ``` --- #### lastSince ```cpp elapsedMillis lastSince ``` --- #### lastSignalQuality ```cpp uint8_t lastSignalQuality ``` --- #### lastMOMSN ```cpp uint16_t lastMOMSN ``` --- #### lastSend ```cpp WII5IRIDIUM_SEND_RESULT lastSend ``` --- #### lastReceive ```cpp WII5IRIDIUM_RECEIVE_RESULT lastReceive ``` --- #### lastReceiveLen ```cpp uint16_t lastReceiveLen ``` --- #### lastReceiveBuff ```cpp uint8_t * lastReceiveBuff ``` ### Public Methods | Return | Name | Description | |--------|------|-------------| | | [`WII5Iridium`](#wii5iridium-3) `inline` | | | `WII5_CONTROLLERS` | [`controllerId`](#controllerid-9) `virtual` `inline` | Identify the controller category for logging/status. | | `WII5_DRIVERS` | [`driverId`](#driverid-6) `virtual` `inline` | Identify the driver category for logging/status. | | `void` | [`begin`](#begin-10) | One-time bring-up. | | `void` | [`loop`](#loop-5) `virtual` | State-machine tick: parses serial, advances steps. | | `bool` | [`requestFirmware`](#requestfirmware) | Queue a firmware-version query (AT+CGMR). | | `bool` | [`requestSendBinary`](#requestsendbinary) | Queue a binary send (uses buffer set by setBinary/setBinSize). | | `bool` | [`requestSendText`](#requestsendtext) | Queue a text send (uses buffer set by setText). | | `WII5IRIDIUM_REQUEST` | [`currentRequest`](#currentrequest) | Currently-queued request type. | | `void` | [`setBinary`](#setbinary) | Set the binary buffer + length for the next send. | | `void` | [`setBinSize`](#setbinsize) | Set just the size of the binary buffer (caller writes the bytes). | | `void` | [`setText`](#settext) | Set the text payload for the next send (RAM string). | | `void` | [`setText`](#settext-1) | Set the text payload for the next send (PROGMEM string). | | `void` | [`start`](#start-3) `virtual` | Begin a comms cycle (`force` skips initialized check). | | `void` | [`stop`](#stop-3) `virtual` | Abort the current cycle. | | `void` | [`powerOn`](#poweron-2) `virtual` | Apply power to the Iridium modem. | | `void` | [`powerOff`](#poweroff-2) `virtual` | Cut power to the Iridium modem. | | `bool` | [`waiting`](#waiting) | Are we waiting on the modem to finish a step? | | `bool` | [`isRunning`](#isrunning-3) | Is the state machine currently in a non-idle step? | | `void` | [`sendNewLine`](#sendnewline) `virtual` | | --- #### WII5Iridium `inline` ```cpp inline WII5Iridium() ``` --- #### controllerId `virtual` `inline` ```cpp virtual inline WII5_CONTROLLERS controllerId() ``` Identify the controller category for logging/status. --- #### driverId `virtual` `inline` ```cpp virtual inline WII5_DRIVERS driverId() ``` Identify the driver category for logging/status. --- #### begin ```cpp void begin() ``` One-time bring-up. --- #### loop `virtual` ```cpp virtual void loop() ``` State-machine tick: parses serial, advances steps. --- #### requestFirmware ```cpp bool requestFirmware() ``` Queue a firmware-version query (AT+CGMR). --- #### requestSendBinary ```cpp bool requestSendBinary() ``` Queue a binary send (uses buffer set by setBinary/setBinSize). --- #### requestSendText ```cpp bool requestSendText() ``` Queue a text send (uses buffer set by setText). --- #### currentRequest ```cpp WII5IRIDIUM_REQUEST currentRequest() ``` Currently-queued request type. --- #### setBinary ```cpp void setBinary(uint8_t * buf, uint16_t size) ``` Set the binary buffer + length for the next send. --- #### setBinSize ```cpp void setBinSize(uint16_t size) ``` Set just the size of the binary buffer (caller writes the bytes). --- #### setText ```cpp void setText(char * str) ``` Set the text payload for the next send (RAM string). --- #### setText ```cpp void setText(const __FlashStringHelper * str) ``` Set the text payload for the next send (PROGMEM string). --- #### start `virtual` ```cpp virtual void start(bool force) ``` Begin a comms cycle (`force` skips initialized check). --- #### stop `virtual` ```cpp virtual void stop(bool force) ``` Abort the current cycle. --- #### powerOn `virtual` ```cpp virtual void powerOn(bool force) ``` Apply power to the Iridium modem. --- #### powerOff `virtual` ```cpp virtual void powerOff(bool force) ``` Cut power to the Iridium modem. --- #### waiting ```cpp bool waiting() ``` Are we waiting on the modem to finish a step? --- #### isRunning ```cpp bool isRunning() ``` Is the state machine currently in a non-idle step? --- #### sendNewLine `virtual` ```cpp virtual void sendNewLine() ``` ### Protected Attributes | Return | Name | Description | |--------|------|-------------| | `bool` | [`running`](#running-2) | | | `WII5IRIDIUM_STEPS` | [`step`](#step-3) | | | `WII5IRIDIUM_STEPS` | [`stepLast`](#steplast-2) | | | `elapsedMillis` | [`stepWait`](#stepwait-3) | | | `bool` | [`initialized`](#initialized) | | | `WII5IRIDIUM_REQUEST` | [`currentType`](#currenttype) | | | `uint8_t` | [`retry`](#retry-1) | | | `uint8_t` | [`sigQualRetry`](#sigqualretry) | | | `uint8_t` | [`sigQualMin`](#sigqualmin) | | | `uint32_t` | [`binSize`](#binsize) | | | `uint16_t` | [`checksum`](#checksum) | | | `uint16_t` | [`loopcount`](#loopcount) | | | `uint8_t *` | [`txData`](#txdata) | | --- #### running ```cpp bool running ``` --- #### step ```cpp WII5IRIDIUM_STEPS step ``` --- #### stepLast ```cpp WII5IRIDIUM_STEPS stepLast ``` --- #### stepWait ```cpp elapsedMillis stepWait ``` --- #### initialized ```cpp bool initialized ``` --- #### currentType ```cpp WII5IRIDIUM_REQUEST currentType ``` --- #### retry ```cpp uint8_t retry ``` --- #### sigQualRetry ```cpp uint8_t sigQualRetry ``` --- #### sigQualMin ```cpp uint8_t sigQualMin ``` --- #### binSize ```cpp uint32_t binSize ``` --- #### checksum ```cpp uint16_t checksum ``` --- #### loopcount ```cpp uint16_t loopcount ``` --- #### txData ```cpp uint8_t * txData ``` ### Protected Methods | Return | Name | Description | |--------|------|-------------| | `void` | [`programLine`](#programline) `virtual` | | --- #### programLine `virtual` ```cpp virtual void programLine(uint16_t l) ``` ## WII5Sparton ```cpp #include ``` > **Inherits:** [`WII5Power`](#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](#wii5_data_spartonbinary). ### Public Attributes | Return | Name | Description | |--------|------|-------------| | `bool` | [`capture`](#capture) | | | `time_t` | [`lastStartTime`](#laststarttime-1) | | | `uint32_t` | [`lastRunTime`](#lastruntime-2) | | | `uint32_t` | [`captureWriteMax`](#capturewritemax-1) | | | `uint32_t` | [`captureWriteMin`](#capturewritemin-1) | | | `uint32_t` | [`captureWriteOver`](#capturewriteover-1) | | | `uint32_t` | [`statsTimeError`](#statstimeerror) | | | `uint32_t` | [`serialSizeError`](#serialsizeerror) | | --- #### capture ```cpp bool capture ``` --- #### lastStartTime ```cpp time_t lastStartTime ``` --- #### lastRunTime ```cpp uint32_t lastRunTime ``` --- #### captureWriteMax ```cpp uint32_t captureWriteMax ``` --- #### captureWriteMin ```cpp uint32_t captureWriteMin ``` --- #### captureWriteOver ```cpp uint32_t captureWriteOver ``` --- #### statsTimeError ```cpp uint32_t statsTimeError ``` --- #### serialSizeError ```cpp uint32_t serialSizeError ``` ### Public Methods | Return | Name | Description | |--------|------|-------------| | | [`WII5Sparton`](#wii5sparton-3) `inline` | | | `WII5_CONTROLLERS` | [`controllerId`](#controllerid-10) `virtual` `inline` | Identify the controller category for logging/status. | | `WII5_DRIVERS` | [`driverId`](#driverid-7) `virtual` `inline` | Identify the driver category for logging/status. | | `void` | [`begin`](#begin-11) | One-time bring-up. | | `void` | [`loop`](#loop-6) | State-machine tick: parses incoming records, advances steps. | | `void` | [`start`](#start-4) `virtual` | Begin a programming + capture cycle. | | `void` | [`info`](#info) | Query the AHRS for firmware/version info. | | `void` | [`stop`](#stop-4) | Abort the current cycle. | | `void` | [`automatic`](#automatic) | Run an automated capture for `records` samples at `hz` Hz. | | `void` | [`setBaudrate`](#setbaudrate) `virtual` | Reconfigure the IMU UART baud rate. | | `void` | [`on`](#on-1) | Apply power to the Sparton. | | `void` | [`off`](#off-1) | Cut power to the Sparton. | | `bool` | [`isRunning`](#isrunning-4) | Is a programming/capture cycle in flight? | | `void` | [`captureRun`](#capturerun) | Begin a capture (after programming completes). | | `bool` | [`captureRunning`](#capturerunning) | Are we currently capturing samples? | | `bool` | [`captureWaiting`](#capturewaiting) | Are we waiting for a capture trigger? | | `bool` | [`captureFinished`](#capturefinished) | Has the most recent capture completed? | | `void` | [`sendLine`](#sendline) | Send a single NorthTek programming line to the IMU. | | `void` | [`setRawCapture`](#setrawcapture) | Enable/disable raw-record passthrough to the capture file. | | `bool` | [`getRawCapture`](#getrawcapture) | Current raw-capture flag. | | `void` | [`setConsoleDirect`](#setconsoledirect) | Enable/disable console-direct output (used when no SD card is present). | | `bool` | [`getConsoleDirect`](#getconsoledirect) | Current console-direct flag. | | `void` | [`displaySTATS`](#displaystats) `virtual` | Print capture statistics to the console. | | `uint16_t` | [`getHz`](#gethz) | Current sample rate in Hz. | | `uint16_t` | [`getMs`](#getms) | Current sample period in milliseconds. | | `void` | [`setHz`](#sethz) | Reconfigure the sample rate (Hz). | | `void` | [`setBinary`](#setbinary-1) | Enable/disable binary record format. | | `void` | [`programLine`](#programline-1) `virtual` | Emit a single NorthTek programming line by index. | | `void` | [`setPassthrough`](#setpassthrough) | Enable/disable raw serial passthrough to the console. | | `bool` | [`getPassthrough`](#getpassthrough) | Current passthrough flag. | | `void` | [`setDebug`](#setdebug-1) | Enable/disable verbose debug output. | | `bool` | [`getDebug`](#getdebug-1) | Current debug flag. | | `void` | [`setCapture`](#setcapture) | Enable/disable capture-on-start. | | `bool` | [`getCapture`](#getcapture) | Current capture flag. | | `void` | [`setRecords`](#setrecords) | Set the number of records to capture. | | `uint32_t` | [`getRecords`](#getrecords) | Current record count target. | | `void` | [`repl`](#repl) | Drop into a NorthTek REPL for interactive configuration. | | `void` | [`resetData`](#resetdata) | Reset internal capture buffers and counters. | --- #### WII5Sparton `inline` ```cpp inline WII5Sparton() ``` --- #### controllerId `virtual` `inline` ```cpp virtual inline WII5_CONTROLLERS controllerId() ``` Identify the controller category for logging/status. --- #### driverId `virtual` `inline` ```cpp virtual inline WII5_DRIVERS driverId() ``` Identify the driver category for logging/status. --- #### begin ```cpp void begin() ``` One-time bring-up. --- #### loop ```cpp void loop() ``` State-machine tick: parses incoming records, advances steps. --- #### start `virtual` ```cpp virtual void start() ``` Begin a programming + capture cycle. --- #### info ```cpp void info() ``` Query the AHRS for firmware/version info. --- #### stop ```cpp void stop(bool force) ``` Abort the current cycle. --- #### automatic ```cpp void automatic(uint8_t hz, uint32_t records, bool capture) ``` Run an automated capture for `records` samples at `hz` Hz. --- #### setBaudrate `virtual` ```cpp virtual void setBaudrate(uint32_t baud) ``` Reconfigure the IMU UART baud rate. --- #### on ```cpp void on(bool forced) ``` Apply power to the Sparton. --- #### off ```cpp void off(bool forced) ``` Cut power to the Sparton. --- #### isRunning ```cpp bool isRunning() ``` Is a programming/capture cycle in flight? --- #### captureRun ```cpp void captureRun() ``` Begin a capture (after programming completes). --- #### captureRunning ```cpp bool captureRunning() ``` Are we currently capturing samples? --- #### captureWaiting ```cpp bool captureWaiting() ``` Are we waiting for a capture trigger? --- #### captureFinished ```cpp bool captureFinished() ``` Has the most recent capture completed? --- #### sendLine ```cpp void sendLine(uint16_t l) ``` Send a single NorthTek programming line to the IMU. --- #### setRawCapture ```cpp void setRawCapture(bool in) ``` Enable/disable raw-record passthrough to the capture file. --- #### getRawCapture ```cpp bool getRawCapture() ``` Current raw-capture flag. --- #### setConsoleDirect ```cpp void setConsoleDirect(bool in) ``` Enable/disable console-direct output (used when no SD card is present). --- #### getConsoleDirect ```cpp bool getConsoleDirect() ``` Current console-direct flag. --- #### displaySTATS `virtual` ```cpp virtual void displaySTATS() ``` Print capture statistics to the console. --- #### getHz ```cpp uint16_t getHz() ``` Current sample rate in Hz. --- #### getMs ```cpp uint16_t getMs() ``` Current sample period in milliseconds. --- #### setHz ```cpp void setHz(uint16_t h) ``` Reconfigure the sample rate (Hz). --- #### setBinary ```cpp void setBinary(bool in) ``` Enable/disable binary record format. --- #### programLine `virtual` ```cpp virtual void programLine(uint16_t l) ``` Emit a single NorthTek programming line by index. --- #### setPassthrough ```cpp void setPassthrough(bool in) ``` Enable/disable raw serial passthrough to the console. --- #### getPassthrough ```cpp bool getPassthrough() ``` Current passthrough flag. --- #### setDebug ```cpp void setDebug(bool in) ``` Enable/disable verbose debug output. --- #### getDebug ```cpp bool getDebug() ``` Current debug flag. --- #### setCapture ```cpp void setCapture(bool in) ``` Enable/disable capture-on-start. --- #### getCapture ```cpp bool getCapture() ``` Current capture flag. --- #### setRecords ```cpp void setRecords(uint32_t in) ``` Set the number of records to capture. --- #### getRecords ```cpp uint32_t getRecords() ``` Current record count target. --- #### repl ```cpp void repl() ``` Drop into a NorthTek REPL for interactive configuration. --- #### resetData ```cpp void resetData() ``` Reset internal capture buffers and counters. ### Protected Attributes | Return | Name | Description | |--------|------|-------------| | `bool` | [`running`](#running-3) | | | `bool` | [`cancel`](#cancel) | | | `bool` | [`rawCapture`](#rawcapture) | | | `bool` | [`consoleDirect`](#consoledirect) | | | `uint16_t` | [`HZ`](#hz) | | | `bool` | [`binMode`](#binmode) | | | `bool` | [`debug`](#debug-1) | | | `uint32_t` | [`recordTotal`](#recordtotal) | | | `elapsedMillis` | [`elapsedRequest`](#elapsedrequest) | | | `uint32_t` | [`sendCount`](#sendcount) | | | `uint16_t` | [`programStart`](#programstart) | | | `uint16_t` | [`programEnd`](#programend) | | | `WII5SPARTON_STEPS` | [`step`](#step-4) | | | `WII5SPARTON_STEPS` | [`stepLast`](#steplast-3) | | | `elapsedMillis` | [`stepWait`](#stepwait-4) | | | `uint32_t` | [`recordCount`](#recordcount-1) | | | `uint8_t` | [`lastValidRecord`](#lastvalidrecord) | | | `WII5_DATA_SpartonBinary` | [`binRecords`](#binrecords) | | | `uint8_t` | [`currentRecord`](#currentrecord) | | | `uint8_t` | [`currentCount`](#currentcount) | | | `bool` | [`binEscape`](#binescape) | | | `uint8_t` | [`processMode`](#processmode) | | | `elapsedMillis` | [`startCapture`](#startcapture) | | | `elapsedMillis` | [`startWhen`](#startwhen) | | | `elapsedMillis` | [`lastWrite`](#lastwrite) | | | `uint32_t` | [`blockNext`](#blocknext) | | | `elapsedMillis` | [`captureWriteTime`](#capturewritetime-1) | | | `time_t` | [`timeStart`](#timestart) | | | `time_t` | [`timeEnd`](#timeend) | | --- #### running ```cpp bool running ``` --- #### cancel ```cpp bool cancel ``` --- #### rawCapture ```cpp bool rawCapture ``` --- #### consoleDirect ```cpp bool consoleDirect ``` --- #### HZ ```cpp uint16_t HZ ``` --- #### binMode ```cpp bool binMode ``` --- #### debug ```cpp bool debug ``` --- #### recordTotal ```cpp uint32_t recordTotal ``` --- #### elapsedRequest ```cpp elapsedMillis elapsedRequest ``` --- #### sendCount ```cpp uint32_t sendCount ``` --- #### programStart ```cpp uint16_t programStart ``` --- #### programEnd ```cpp uint16_t programEnd ``` --- #### step ```cpp WII5SPARTON_STEPS step ``` --- #### stepLast ```cpp WII5SPARTON_STEPS stepLast ``` --- #### stepWait ```cpp elapsedMillis stepWait ``` --- #### recordCount ```cpp uint32_t recordCount ``` --- #### lastValidRecord ```cpp uint8_t lastValidRecord ``` --- #### binRecords ```cpp WII5_DATA_SpartonBinary binRecords ``` --- #### currentRecord ```cpp uint8_t currentRecord ``` --- #### currentCount ```cpp uint8_t currentCount ``` --- #### binEscape ```cpp bool binEscape ``` --- #### processMode ```cpp uint8_t processMode ``` --- #### startCapture ```cpp elapsedMillis startCapture ``` --- #### startWhen ```cpp elapsedMillis startWhen ``` --- #### lastWrite ```cpp elapsedMillis lastWrite ``` --- #### blockNext ```cpp uint32_t blockNext ``` --- #### captureWriteTime ```cpp elapsedMillis captureWriteTime ``` --- #### timeStart ```cpp time_t timeStart ``` --- #### timeEnd ```cpp time_t timeEnd ``` ### Protected Methods | Return | Name | Description | |--------|------|-------------| | `void` | [`handleRxChar`](#handlerxchar) | | --- #### handleRxChar ```cpp void handleRxChar(uint8_t c) ``` ## WII5Strings ```cpp #include ``` ### Public Methods | Return | Name | Description | |--------|------|-------------| | | [`WII5Strings`](#wii5strings-3) `inline` | | | `WII5_CONTROLLERS` | [`controllerId`](#controllerid-11) `virtual` `inline` | | | `WII5_COMMANDS` | [`parseCommand`](#parsecommand) | | | `WII5_DEVICES` | [`parseDevice`](#parsedevice) | | | `WII5_DRIVERS` | [`parseDriver`](#parsedriver) | | | `WII5_PORTS` | [`parsePort`](#parseport) | | | `WII5GPS_MODES` | [`parseGPSMode`](#parsegpsmode) | | | `WII5_SWITCH` | [`parseSwitch`](#parseswitch) | | | `WII5_MODES` | [`parseMode`](#parsemode) | | | `char *` | [`strCommand`](#strcommand) | | | `char *` | [`strDevice`](#strdevice) | | | `char *` | [`strDriver`](#strdriver) | | | `char *` | [`strPort`](#strport) | | | `char *` | [`strStatus`](#strstatus) | | | `char *` | [`strError`](#strerror) | | | `char *` | [`strSwitch`](#strswitch) | | | `char *` | [`strGPSMode`](#strgpsmode) | | | `char *` | [`strPinMode`](#strpinmode) | | | `char *` | [`strState`](#strstate) | | | `char *` | [`strMode`](#strmode) | | | `char *` | [`strPinArduinoName`](#strpinarduinoname) | | | `char *` | [`strPinWII5Name`](#strpinwii5name) | | | `char *` | [`strSelfTestStatus`](#strselfteststatus) | | | `char *` | [`strSelfTestStatusLong`](#strselfteststatuslong) | | | `char *` | [`strSelfTestDevice`](#strselftestdevice) | | --- #### WII5Strings `inline` ```cpp inline WII5Strings() ``` --- #### controllerId `virtual` `inline` ```cpp virtual inline WII5_CONTROLLERS controllerId() ``` --- #### parseCommand ```cpp WII5_COMMANDS parseCommand(char * in1, char * in2, char * in3) ``` --- #### parseDevice ```cpp WII5_DEVICES parseDevice(char * in) ``` --- #### parseDriver ```cpp WII5_DRIVERS parseDriver(char * in) ``` --- #### parsePort ```cpp WII5_PORTS parsePort(char * in) ``` --- #### parseGPSMode ```cpp WII5GPS_MODES parseGPSMode(char * in) ``` --- #### parseSwitch ```cpp WII5_SWITCH parseSwitch(char * in) ``` --- #### parseMode ```cpp WII5_MODES parseMode(char * in) ``` --- #### strCommand ```cpp char * strCommand(WII5_COMMANDS c) ``` --- #### strDevice ```cpp char * strDevice(WII5_DEVICES d) ``` --- #### strDriver ```cpp char * strDriver(WII5_DRIVERS d) ``` --- #### strPort ```cpp char * strPort(WII5_PORTS p) ``` --- #### strStatus ```cpp char * strStatus(WII5_STATUS s) ``` --- #### strError ```cpp char * strError(WII5_ERRORS e) ``` --- #### strSwitch ```cpp char * strSwitch(WII5_SWITCH s) ``` --- #### strGPSMode ```cpp char * strGPSMode(WII5GPS_MODES m) ``` --- #### strPinMode ```cpp char * strPinMode(uint8_t p) ``` --- #### strState ```cpp char * strState(uint8_t p) ``` --- #### strMode ```cpp char * strMode(WII5_MODES p) ``` --- #### strPinArduinoName ```cpp char * strPinArduinoName(uint8_t p) ``` --- #### strPinWII5Name ```cpp char * strPinWII5Name(uint8_t p) ``` --- #### strSelfTestStatus ```cpp char * strSelfTestStatus(WII5SELFTEST_STATUS in) ``` --- #### strSelfTestStatusLong ```cpp char * strSelfTestStatusLong(WII5SELFTEST_STATUS in) ``` --- #### strSelfTestDevice ```cpp char * strSelfTestDevice(WII5SELFTEST_DEVICES in) ``` ### Protected Methods | Return | Name | Description | |--------|------|-------------| | `void` | [`setBufferUnknown`](#setbufferunknown) | | --- #### setBufferUnknown ```cpp void setBufferUnknown() ``` ## WII5Commands ```cpp #include ``` > **Inherits:** [`WII5`](#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`](#disablebuttons) | | | `elapsedMillis` | [`lastCommandAge`](#lastcommandage) | | | `time_t` | [`lastCommandT`](#lastcommandt) | | | `WII5_PORTS` | [`lastCommandPort`](#lastcommandport) | | | `WII5_DEVICES` | [`lastCommandDevice`](#lastcommanddevice) | | | `WII5_AREAS` | [`lastCommandArea`](#lastcommandarea) | | | `WII5_COMMANDS` | [`lastCommandCmd`](#lastcommandcmd) | | | `uint32_t` | [`lastCommandParam1`](#lastcommandparam1) | | | `uint32_t` | [`lastCommandParam2`](#lastcommandparam2) | | | `uint32_t` | [`lastCommandParam3`](#lastcommandparam3) | | | `WII5_RESULTS` | [`lastCommandResult`](#lastcommandresult) | | | `char` | [`lastCommandMessage`](#lastcommandmessage) | | | `bool` | [`lastCommandAckComplete`](#lastcommandackcomplete) | | --- #### disableButtons ```cpp elapsedMillis disableButtons ``` --- #### lastCommandAge ```cpp elapsedMillis lastCommandAge ``` --- #### lastCommandT ```cpp time_t lastCommandT ``` --- #### lastCommandPort ```cpp WII5_PORTS lastCommandPort ``` --- #### lastCommandDevice ```cpp WII5_DEVICES lastCommandDevice ``` --- #### lastCommandArea ```cpp WII5_AREAS lastCommandArea ``` --- #### lastCommandCmd ```cpp WII5_COMMANDS lastCommandCmd ``` --- #### lastCommandParam1 ```cpp uint32_t lastCommandParam1 ``` --- #### lastCommandParam2 ```cpp uint32_t lastCommandParam2 ``` --- #### lastCommandParam3 ```cpp uint32_t lastCommandParam3 ``` --- #### lastCommandResult ```cpp WII5_RESULTS lastCommandResult ``` --- #### lastCommandMessage ```cpp char lastCommandMessage ``` --- #### lastCommandAckComplete ```cpp bool lastCommandAckComplete ``` ### Public Methods | Return | Name | Description | |--------|------|-------------| | `WII5_CONTROLLERS` | [`controllerId`](#controllerid-12) `virtual` `inline` | Identify the controller category for logging/status. | | `void` | [`begin`](#begin-12) | One-time bring-up. | | `bool` | [`injectCommand`](#injectcommand) | Feed an AT-style command into the command pipeline as if it came from the console. | | `bool` | [`processConsoleStandard`](#processconsolestandard) | Drain pending "X;" single-letter commands from the console. | | `bool` | [`processConsoleAT`](#processconsoleat) | Drain pending "@AREA,cmd,..." AT-style commands from the console. | | `bool` | [`processButtons`](#processbuttons) | Translate physical button events (click/long-hold) into commands. | | `bool` | [`processNetwork`](#processnetwork) | Drain pending packets from the LoRa network (if enabled). | | `bool` | [`processBinData`](#processbindata) | Process any incoming BinData payload (typically from Iridium). | | `bool` | [`runCommand`](#runcommand) | Execute a parsed command; returns true on success. | | `void` | [`setupLast`](#setuplast) | Record the source/area of the command currently being processed. | | `void` | [`doneLast`](#donelast) | Finalize lastCommand bookkeeping (call after runCommand). | | `void` | [`resultLast`](#resultlast) | Set the result + message for the last command (mutable buffer). | | `void` | [`resultLast`](#resultlast-1) | Set the result + message for the last command (PROGMEM string). | | `void` | [`resultLast`](#resultlast-2) | Set the result for the last command without altering the message. | | `void` | [`dump`](#dump-2) | Print a debug dump of command state to the console. | --- #### controllerId `virtual` `inline` ```cpp virtual inline WII5_CONTROLLERS controllerId() ``` Identify the controller category for logging/status. --- #### begin ```cpp void begin() ``` One-time bring-up. --- #### injectCommand ```cpp bool injectCommand(char * sendCmd) ``` Feed an AT-style command into the command pipeline as if it came from the console. --- #### processConsoleStandard ```cpp bool processConsoleStandard() ``` Drain pending "X;" single-letter commands from the console. --- #### processConsoleAT ```cpp bool processConsoleAT() ``` Drain pending "@AREA,cmd,..." AT-style commands from the console. --- #### processButtons ```cpp bool processButtons() ``` Translate physical button events (click/long-hold) into commands. --- #### processNetwork ```cpp bool processNetwork() ``` Drain pending packets from the LoRa network (if enabled). --- #### processBinData ```cpp bool processBinData() ``` Process any incoming BinData payload (typically from Iridium). --- #### runCommand ```cpp bool runCommand(WII5_COMMANDS cmd, char ** params, uint8_t paramsLen) ``` Execute a parsed command; returns true on success. --- #### setupLast ```cpp 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 ```cpp void doneLast() ``` Finalize lastCommand bookkeeping (call after runCommand). --- #### resultLast ```cpp void resultLast(WII5_RESULTS result, char * message) ``` Set the result + message for the last command (mutable buffer). --- #### resultLast ```cpp void resultLast(WII5_RESULTS result, const __FlashStringHelper * area) ``` Set the result + message for the last command (PROGMEM string). --- #### resultLast ```cpp void resultLast(WII5_RESULTS result) ``` Set the result for the last command without altering the message. --- #### dump ```cpp void dump() ``` Print a debug dump of command state to the console. ### Protected Attributes | Return | Name | Description | |--------|------|-------------| | `elapsedMillis` | [`delayWait`](#delaywait) | | | `time_t` | [`when`](#when-1) | | | `elapsedMillis` | [`buttonHeld`](#buttonheld) | | | `elapsedMillis` | [`buttonReleaseWait`](#buttonreleasewait) | | | `bool` | [`buttonActive`](#buttonactive) | | | `bool` | [`buttonReleased`](#buttonreleased) | | | `uint8_t` | [`buttonMode`](#buttonmode) | | --- #### delayWait ```cpp elapsedMillis delayWait ``` --- #### when ```cpp time_t when ``` --- #### buttonHeld ```cpp elapsedMillis buttonHeld ``` --- #### buttonReleaseWait ```cpp elapsedMillis buttonReleaseWait ``` --- #### buttonActive ```cpp bool buttonActive ``` --- #### buttonReleased ```cpp bool buttonReleased ``` --- #### buttonMode ```cpp uint8_t buttonMode ``` ## WII5Sh3dUtil ```cpp #include ``` ### Public Attributes | Return | Name | Description | |--------|------|-------------| | `uint32_t` | [`sleepLastSeconds`](#sleeplastseconds) | | | `uint8_t` | [`sleepLastReason`](#sleeplastreason) | | | `time_t` | [`sleepLastTime`](#sleeplasttime) | | --- #### sleepLastSeconds ```cpp uint32_t sleepLastSeconds ``` --- #### sleepLastReason ```cpp uint8_t sleepLastReason ``` --- #### sleepLastTime ```cpp time_t sleepLastTime ``` ### Public Methods | Return | Name | Description | |--------|------|-------------| | `void` | [`begin`](#begin-13) | | | `void` | [`loop`](#loop-7) | | | `void` | [`reset`](#reset) | | | `uint8_t` | [`sleep`](#sleep-1) | | --- #### begin ```cpp void begin() ``` --- #### loop ```cpp void loop() ``` --- #### reset ```cpp void reset() ``` --- #### sleep ```cpp uint8_t sleep(uint32_t seconds) ``` ## WII5ModeSleep ```cpp #include ``` > **Inherits:** [`WII5Mode`](#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`](#wii5modesleep-3) `inline` | | | `void` | [`reset`](#reset-1) | Reset to WII5SLEEP_START. | | `void` | [`begin`](#begin-14) `virtual` | One-time bring-up. | | `void` | [`loop`](#loop-8) `virtual` | State-machine tick. | --- #### WII5ModeSleep `inline` ```cpp inline WII5ModeSleep() ``` --- #### reset ```cpp void reset() ``` Reset to WII5SLEEP_START. --- #### begin `virtual` ```cpp virtual void begin() ``` One-time bring-up. --- #### loop `virtual` ```cpp virtual void loop() ``` State-machine tick. ### Protected Attributes | Return | Name | Description | |--------|------|-------------| | `bool` | [`first`](#first-2) | | | `WII5SLEEP_STEPS` | [`lastStep`](#laststep) | | | `elapsedMillis` | [`stepWait`](#stepwait-5) | | | `elapsedMillis` | [`displayWait`](#displaywait-1) | | | `WII5SLEEP_STEPS` | [`step`](#step-5) | | | `uint32_t` | [`sleepNextSeconds`](#sleepnextseconds) | | --- #### first ```cpp bool first ``` --- #### lastStep ```cpp WII5SLEEP_STEPS lastStep ``` --- #### stepWait ```cpp elapsedMillis stepWait ``` --- #### displayWait ```cpp elapsedMillis displayWait ``` --- #### step ```cpp WII5SLEEP_STEPS step ``` --- #### sleepNextSeconds ```cpp uint32_t sleepNextSeconds ``` ## WII5Controller ```cpp #include ``` > **Inherits:** [`WII5`](#wii5) Top-level firmware controller. Owns the main [loop()](#loop-9), 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`](#modesleep) | | | `WII5ModeCapture *` | [`modeCapture`](#modecapture) | | | `WII5ModeLowBattery *` | [`modeLowBattery`](#modelowbattery) | | | `WII5ModeManualTest *` | [`modeManualTest`](#modemanualtest) | | | `WII5ModePosition *` | [`modePosition`](#modeposition) | | | `WII5ModeSelfTest *` | [`modeSelfTest`](#modeselftest) | | | `time_t` | [`lastHelloReceived`](#lasthelloreceived) | | | `WII5_PORTS` | [`lastHelloPort`](#lasthelloport) | | | `WII5_DEVICES` | [`lastHelloDevice`](#lasthellodevice) | | | `elapsedMillis` | [`lastHelloElapsed`](#lasthelloelapsed) | | | `bool` | [`tempDisableWDT`](#tempdisablewdt) | | | `uint32_t` | [`uptime`](#uptime-1) | | --- #### modeSleep ```cpp WII5ModeSleep * modeSleep ``` --- #### modeCapture ```cpp WII5ModeCapture * modeCapture ``` --- #### modeLowBattery ```cpp WII5ModeLowBattery * modeLowBattery ``` --- #### modeManualTest ```cpp WII5ModeManualTest * modeManualTest ``` --- #### modePosition ```cpp WII5ModePosition * modePosition ``` --- #### modeSelfTest ```cpp WII5ModeSelfTest * modeSelfTest ``` --- #### lastHelloReceived ```cpp time_t lastHelloReceived ``` --- #### lastHelloPort ```cpp WII5_PORTS lastHelloPort ``` --- #### lastHelloDevice ```cpp WII5_DEVICES lastHelloDevice ``` --- #### lastHelloElapsed ```cpp elapsedMillis lastHelloElapsed ``` --- #### tempDisableWDT ```cpp bool tempDisableWDT ``` --- #### uptime ```cpp uint32_t uptime ``` ### Public Methods | Return | Name | Description | |--------|------|-------------| | `WII5_CONTROLLERS` | [`controllerId`](#controllerid-13) `virtual` `inline` | Identify the controller category for logging/status. | | `void` | [`begin`](#begin-15) | One-time bring-up: zero counters, call mode-class [begin()](#begin-15)s, enable WDT. | | `void` | [`safeDelay`](#safedelay) | Spin in [loopSafe()](#loopsafe) / [loopWDT()](#loopwdt) for `waits` milliseconds. | | `WII5_MODES` | [`getMode`](#getmode) | Current run-time mode. | | `bool` | [`setMode`](#setmode) | Switch mode; returns false if the transition was rejected. | | `void` | [`setDefaultMode`](#setdefaultmode-1) | Reset to the EEPROM-configured default mode. | | `void` | [`setCurrentMode`](#setcurrentmode) | Move to whatever [calculateCurrentMode()](#calculatecurrentmode) returns right now. | | `WII5_MODES` | [`calculateCurrentMode`](#calculatecurrentmode) | Compute the mode the buoy should be in given clock + battery + temp overrides. | | `WII5_MODES` | [`calculateDefaultMode`](#calculatedefaultmode) | Compute the persistent default mode from EEPROM configuration. | | `void` | [`setSDOff`](#setsdoff) | Disable both SD-card chip selects. | | `void` | [`setSD1`](#setsd1) | Hand SD card 1 to the AVR side. | | `void` | [`setSD2`](#setsd2) | Hand SD card 2 to the AVR side. | | `uint8_t` | [`getSD`](#getsd) | Which SD card is currently selected (0/1/2). | | `void` | [`shared5On`](#shared5on) | Enable the shared 5V rail (used by GPS, Iridium, Sparton, etc.). | | `void` | [`shared5Off`](#shared5off) | Disable the shared 5V rail. | | `void` | [`setLastHello`](#setlasthello) | Record that a peer device replied to a Hello. | | `bool` | [`checkLastHello`](#checklasthello) | Has device `d` been heard from within the last `msOld` ms? | | `void` | [`loop`](#loop-9) | Main tick: runs WDT, the safe loop, and dispatches the active mode. | | `void` | [`loopSafe`](#loopsafe) | Minimal-cost loop: console, buttons, Iridium, Communications. | | `void` | [`loopOther`](#loopother) | Heavier-cost loop: Sparton, GPS, Battery, Weather, etc. | | `void` | [`loopWDT`](#loopwdt) | Pet the watchdog (external pin and/or AVR internal WDT). | | `void` | [`dump`](#dump-3) | Print a one-line summary of controller state to the console. | | `void` | [`statusDump`](#statusdump) | Print the long-form `@Status` block to the console (human=true for human-readable). | | `void` | [`disableChipSelect`](#disablechipselect) | Tri-state both SD chip-select lines. | --- #### controllerId `virtual` `inline` ```cpp virtual inline WII5_CONTROLLERS controllerId() ``` Identify the controller category for logging/status. --- #### begin ```cpp void begin() ``` One-time bring-up: zero counters, call mode-class [begin()](#begin-15)s, enable WDT. --- #### safeDelay ```cpp void safeDelay(uint32_t waits) ``` Spin in [loopSafe()](#loopsafe) / [loopWDT()](#loopwdt) for `waits` milliseconds. --- #### getMode ```cpp WII5_MODES getMode() ``` Current run-time mode. --- #### setMode ```cpp bool setMode(WII5_MODES newMode, bool nodelay) ``` Switch mode; returns false if the transition was rejected. --- #### setDefaultMode ```cpp void setDefaultMode() ``` Reset to the EEPROM-configured default mode. --- #### setCurrentMode ```cpp void setCurrentMode() ``` Move to whatever [calculateCurrentMode()](#calculatecurrentmode) returns right now. --- #### calculateCurrentMode ```cpp WII5_MODES calculateCurrentMode() ``` Compute the mode the buoy should be in given clock + battery + temp overrides. --- #### calculateDefaultMode ```cpp WII5_MODES calculateDefaultMode() ``` Compute the persistent default mode from EEPROM configuration. --- #### setSDOff ```cpp void setSDOff() ``` Disable both SD-card chip selects. --- #### setSD1 ```cpp void setSD1() ``` Hand SD card 1 to the AVR side. --- #### setSD2 ```cpp void setSD2() ``` Hand SD card 2 to the AVR side. --- #### getSD ```cpp uint8_t getSD() ``` Which SD card is currently selected (0/1/2). --- #### shared5On ```cpp void shared5On() ``` Enable the shared 5V rail (used by GPS, Iridium, Sparton, etc.). --- #### shared5Off ```cpp void shared5Off() ``` Disable the shared 5V rail. --- #### setLastHello ```cpp void setLastHello(WII5_PORTS p, WII5_DEVICES d) ``` Record that a peer device replied to a Hello. --- #### checkLastHello ```cpp bool checkLastHello(WII5_DEVICES d, uint32_t msOld) ``` Has device `d` been heard from within the last `msOld` ms? --- #### loop ```cpp void loop() ``` Main tick: runs WDT, the safe loop, and dispatches the active mode. --- #### loopSafe ```cpp void loopSafe() ``` Minimal-cost loop: console, buttons, Iridium, Communications. --- #### loopOther ```cpp void loopOther() ``` Heavier-cost loop: Sparton, GPS, Battery, Weather, etc. --- #### loopWDT ```cpp void loopWDT() ``` Pet the watchdog (external pin and/or AVR internal WDT). --- #### dump ```cpp void dump() ``` Print a one-line summary of controller state to the console. --- #### statusDump ```cpp void statusDump(bool human) ``` Print the long-form `@Status` block to the console (human=true for human-readable). --- #### disableChipSelect ```cpp void disableChipSelect() ``` Tri-state both SD chip-select lines. ### Protected Attributes | Return | Name | Description | |--------|------|-------------| | `uint8_t` | [`currentSD`](#currentsd) | | | `uint32_t` | [`next`](#next) | | | `uint16_t` | [`size`](#size) | | | `uint32_t` | [`period`](#period) | | | `elapsedMillis` | [`minuteWait`](#minutewait) | | | `elapsedMillis` | [`delayWait`](#delaywait-1) | | | `elapsedMillis` | [`wdtWait`](#wdtwait) | | | `elapsedMillis` | [`modeWait`](#modewait) | | | `WII5_MODES` | [`mode`](#mode) | | | `WII5_MODES` | [`lastMode`](#lastmode) | | | `time_t` | [`modeUntil`](#modeuntil) | | --- #### currentSD ```cpp uint8_t currentSD ``` --- #### next ```cpp uint32_t next ``` --- #### size ```cpp uint16_t size ``` --- #### period ```cpp uint32_t period ``` --- #### minuteWait ```cpp elapsedMillis minuteWait ``` --- #### delayWait ```cpp elapsedMillis delayWait ``` --- #### wdtWait ```cpp elapsedMillis wdtWait ``` --- #### modeWait ```cpp elapsedMillis modeWait ``` --- #### mode ```cpp WII5_MODES mode ``` --- #### lastMode ```cpp WII5_MODES lastMode ``` --- #### modeUntil ```cpp time_t modeUntil ``` ## WII5Sh3dConfig ```cpp #include ``` ### Public Attributes | Return | Name | Description | |--------|------|-------------| | `bool` | [`initialized`](#initialized-1) | | --- #### initialized ```cpp bool initialized = false ``` ### Public Methods | Return | Name | Description | |--------|------|-------------| | `void` | [`begin`](#begin-16) | | | `void` | [`readConfig`](#readconfig) | | | `void` | [`updateConfig`](#updateconfig) | | | `SH3D_TYPE_UNIQUEID` | [`getNodeId`](#getnodeid) | | | `SH3D_TYPE_UNIQUEID` | [`setNodeId`](#setnodeid) | | | `SH3D_TYPE_COUNTER` | [`getRunCount`](#getruncount) | | | `SH3D_TYPE_COUNTER` | [`updateRunCount`](#updateruncount) | | | `SH3D_TYPE_COUNTER` | [`clearRunCount`](#clearruncount) | | | `SH3D_TYPE_COUNTER` | [`getRecordCount`](#getrecordcount-1) | | | `SH3D_TYPE_COUNTER` | [`updateRecordCount`](#updaterecordcount-1) | | | `SH3D_TYPE_COUNTER` | [`clearRecordCount`](#clearrecordcount) | | | `SH3D_TYPE_COUNTER` | [`getStorageLogLast`](#getstorageloglast) | | | `SH3D_TYPE_COUNTER` | [`updateStorageLogLast`](#updatestorageloglast) | | | `SH3D_TYPE_COUNTER` | [`clearStorageLogLast`](#clearstorageloglast) | | | `SH3D_TYPE_COUNTER` | [`getStorageSensorLast`](#getstoragesensorlast) | | | `SH3D_TYPE_COUNTER` | [`updateStorageSensorLast`](#updatestoragesensorlast) | | | `SH3D_TYPE_COUNTER` | [`clearStorageSensorLast`](#clearstoragesensorlast) | | | `uint16_t` | [`sizeExtra`](#sizeextra-1) | | | `uint16_t` | [`startExtra`](#startextra) | | | `void` | [`readExtra`](#readextra-1) | | | `void` | [`updateExtra`](#updateextra-1) | | | `bool` | [`getFlashErased`](#getflasherased) | | | `bool` | [`setFlashErased`](#setflasherased) | | --- #### begin ```cpp void begin() ``` --- #### readConfig ```cpp void readConfig() ``` --- #### updateConfig ```cpp void updateConfig() ``` --- #### getNodeId ```cpp SH3D_TYPE_UNIQUEID getNodeId() ``` --- #### setNodeId ```cpp SH3D_TYPE_UNIQUEID setNodeId(SH3D_TYPE_UNIQUEID newId) ``` --- #### getRunCount ```cpp SH3D_TYPE_COUNTER getRunCount() ``` --- #### updateRunCount ```cpp SH3D_TYPE_COUNTER updateRunCount() ``` --- #### clearRunCount ```cpp SH3D_TYPE_COUNTER clearRunCount(SH3D_TYPE_COUNTER setId) ``` --- #### getRecordCount ```cpp SH3D_TYPE_COUNTER getRecordCount() ``` --- #### updateRecordCount ```cpp SH3D_TYPE_COUNTER updateRecordCount() ``` --- #### clearRecordCount ```cpp SH3D_TYPE_COUNTER clearRecordCount(SH3D_TYPE_COUNTER setId) ``` --- #### getStorageLogLast ```cpp SH3D_TYPE_COUNTER getStorageLogLast() ``` --- #### updateStorageLogLast ```cpp SH3D_TYPE_COUNTER updateStorageLogLast() ``` --- #### clearStorageLogLast ```cpp SH3D_TYPE_COUNTER clearStorageLogLast(SH3D_TYPE_COUNTER setId) ``` --- #### getStorageSensorLast ```cpp SH3D_TYPE_COUNTER getStorageSensorLast() ``` --- #### updateStorageSensorLast ```cpp SH3D_TYPE_COUNTER updateStorageSensorLast() ``` --- #### clearStorageSensorLast ```cpp SH3D_TYPE_COUNTER clearStorageSensorLast(SH3D_TYPE_COUNTER setId) ``` --- #### sizeExtra ```cpp uint16_t sizeExtra() ``` --- #### startExtra ```cpp uint16_t startExtra() ``` --- #### readExtra ```cpp void readExtra(char * data, uint16_t len, uint16_t offset) ``` --- #### updateExtra ```cpp void updateExtra(char * data, uint16_t len, uint16_t offset) ``` --- #### getFlashErased ```cpp bool getFlashErased() ``` --- #### setFlashErased ```cpp bool setFlashErased(bool in) ``` ### Protected Attributes | Return | Name | Description | |--------|------|-------------| | `typeConfig` | [`dataConfig`](#dataconfig) | | --- #### dataConfig ```cpp typeConfig dataConfig ``` ## WII5ModeCapture ```cpp #include ``` > **Inherits:** [`WII5Mode`](#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`](#enableatfile) | | | `bool` | [`enableGPS`](#enablegps) | | | `bool` | [`enableMaths`](#enablemaths) | | | `bool` | [`enableComms`](#enablecomms) | | | `bool` | [`enableLiveSwap`](#enableliveswap) | | | `uint32_t` | [`startTime`](#starttime) | | --- #### enableAtFile ```cpp bool enableAtFile ``` --- #### enableGPS ```cpp bool enableGPS ``` --- #### enableMaths ```cpp bool enableMaths ``` --- #### enableComms ```cpp bool enableComms ``` --- #### enableLiveSwap ```cpp bool enableLiveSwap ``` --- #### startTime ```cpp uint32_t startTime ``` ### Public Methods | Return | Name | Description | |--------|------|-------------| | | [`WII5ModeCapture`](#wii5modecapture-3) `inline` | | | `void` | [`reset`](#reset-2) | Reset to WII5CAPTURE_START. | | `void` | [`begin`](#begin-17) `virtual` | One-time bring-up. | | `void` | [`loop`](#loop-10) `virtual` | State-machine tick. | | `void` | [`start`](#start-5) | Begin a manual capture. | | `void` | [`stop`](#stop-5) | Abort the current capture. | | `void` | [`flip`](#flip) | Switch the active SD card to the alternate one. | --- #### WII5ModeCapture `inline` ```cpp inline WII5ModeCapture() ``` --- #### reset ```cpp void reset() ``` Reset to WII5CAPTURE_START. --- #### begin `virtual` ```cpp virtual void begin() ``` One-time bring-up. --- #### loop `virtual` ```cpp virtual void loop() ``` State-machine tick. --- #### start ```cpp void start(bool force) ``` Begin a manual capture. --- #### stop ```cpp void stop(bool force) ``` Abort the current capture. --- #### flip ```cpp void flip() ``` Switch the active SD card to the alternate one. ### Protected Attributes | Return | Name | Description | |--------|------|-------------| | `elapsedMillis` | [`wait`](#wait-1) | | | `time_t` | [`captureStart`](#capturestart) | | | `WII5CAPTURE_TYPE` | [`captureType`](#capturetype) | | | `WII5CAPTURE_STEPS` | [`step`](#step-6) | | | `WII5CAPTURE_STEPS` | [`stepLast`](#steplast-4) | | | `uint32_t` | [`stepCount`](#stepcount-1) | | | `uint32_t` | [`stepTotal`](#steptotal) | | | `uint8_t` | [`retry`](#retry-2) | | | `uint32_t` | [`minutes`](#minutes-2) | | | `uint32_t` | [`period`](#period-1) | | | `uint32_t` | [`remaining`](#remaining) | | | `bool` | [`debug`](#debug-2) | | --- #### wait ```cpp elapsedMillis wait ``` --- #### captureStart ```cpp time_t captureStart ``` --- #### captureType ```cpp WII5CAPTURE_TYPE captureType ``` --- #### step ```cpp WII5CAPTURE_STEPS step ``` --- #### stepLast ```cpp WII5CAPTURE_STEPS stepLast ``` --- #### stepCount ```cpp uint32_t stepCount ``` --- #### stepTotal ```cpp uint32_t stepTotal ``` --- #### retry ```cpp uint8_t retry ``` --- #### minutes ```cpp uint32_t minutes ``` --- #### period ```cpp uint32_t period ``` --- #### remaining ```cpp uint32_t remaining ``` --- #### debug ```cpp bool debug ``` ## WII5Sh3dConsole ```cpp #include ``` 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`](#printbuffer) | | | `uint16_t` | [`bufferMax`](#buffermax) | | --- #### printBuffer ```cpp char * printBuffer ``` --- #### bufferMax ```cpp uint16_t bufferMax ``` ### Public Methods | Return | Name | Description | |--------|------|-------------| | `void` | [`begin`](#begin-18) | One-time bring-up. | | `void` | [`begin`](#begin-19) | One-time bring-up using caller-supplied buffers. | | `bool` | [`add`](#add) | Add a Stream source to the console (typically a Serial port). | | `bool` | [`remove`](#remove) | Remove a previously-added Stream. | | `bool` | [`enableBinary`](#enablebinary) | Enable Binary frame parsing (caller must provide a buffer). | | `bool` | [`disableBinary`](#disablebinary) | Disable Binary frame parsing. | | `void` | [`setBinaryBuffer`](#setbinarybuffer) | Set the buffer used to receive Binary frames. | | `void` | [`clearCommand`](#clearcommand) | Discard any in-flight command. | | `void` | [`clearCallback`](#clearcallback) | Remove the registered logging callback. | | `void` | [`setCallbackFunction`](#setcallbackfunction) | Register a callback invoked on log output. | | `void` | [`setCallbackStorage`](#setcallbackstorage) | Use the default storage-callback (writes to the SD log). | | `void` | [`setCallbackLevel`](#setcallbacklevel) | Only invoke the callback for messages at this level or above. | | `uint8_t` | [`getCallbackLevel`](#getcallbacklevel) | Current callback log-level threshold. | | `void` | [`doCallback`](#docallback) | Manually fire the callback for a given level. | | `void` | [`setLevel`](#setlevel) | Set the console log-level threshold. | | `int8_t` | [`getLevel`](#getlevel) `inline` | Current console log-level threshold. | | `void` | [`loop`](#loop-11) | Tick: read from streams, parse frames, run timeouts. | | `void` | [`flush`](#flush) | Flush all output streams. | | `bool` | [`available`](#available) | True once a complete command frame has been received. | | `byte` | [`getCommand`](#getcommand-1) `inline` | First byte of the most recent "X;" standard-style command. | | `uint32_t` | [`getVal`](#getval) `inline` | Numeric argument from the most recent "X;" command. | | `char *` | [`getBuffer`](#getbuffer) `inline` | Raw command-buffer pointer. | | `void` | [`processCmd`](#processcmd) | Feed a byte into the standard-style command parser. | | `void` | [`processCsv`](#processcsv) | Finalize parsing of a CSV (-prefixed) command frame. | | `uint8_t` | [`getCsvCount`](#getcsvcount) `inline` | Number of CSV fields parsed in the current frame. | | `uint32_t` | [`getCsvVal`](#getcsvval) `inline` | CSV field `n` interpreted as uint32. | | `char *` | [`getCsvBuffer`](#getcsvbuffer) `inline` | CSV field `n` as the original string. | | `void` | [`setDateTime`](#setdatetime) `inline` | Enable date-time prefix on log output. | | `void` | [`clearDateTime`](#cleardatetime) `inline` | Disable date-time prefix on log output. | | `void` | [`printDateTime`](#printdatetime) | Print a formatted date-time prefix (current time if t==0). | | `void` | [`print`](#print) | Print a string to all output streams. | | `void` | [`sprintf`](#sprintf) | printf to a single stream rather than all of them. | | `void` | [`printf`](#printf) | printf to all output streams (RAM format string). | | `void` | [`printf`](#printf-1) | printf to all output streams (PROGMEM format string). | | `void` | [`printPrefix`](#printprefix) | Emit the level-prefix string ("# INFO: " etc) for a level. | | `void` | [`log`](#log) | Log a message at level `l` (RAM format string). | | `void` | [`log`](#log-1) | Log a message at level `l` (PROGMEM format string). | | `void` | [`safeLog`](#safelog) | | | `void` | [`safeLog`](#safelog-1) | | | `void` | [`nmeaSend`](#nmeasend) | | | `void` | [`nmeaCRCSend`](#nmeacrcsend) | | | `void` | [`printNewLine`](#printnewline) | | | `bool` | [`availableBin`](#availablebin) `inline` | | | `char *` | [`getBinBuffer`](#getbinbuffer) `inline` | | | `uint16_t` | [`getBinLength`](#getbinlength) `inline` | | | `void` | [`printBinary`](#printbinary) | | | `void` | [`printBits`](#printbits) | | | | [`WII5Sh3dConsole`](#wii5sh3dconsole-1) `inline` | | | `void` | [`setEcho`](#setecho) | | | `bool` | [`getEcho`](#getecho) | | --- #### begin ```cpp void begin(uint16_t bufSize, uint16_t cmdSize) ``` One-time bring-up. Allocates internal print + command buffers. --- #### begin ```cpp void begin(char * buf, uint16_t bufSize, char * cmdBuf, uint16_t cmdSize) ``` One-time bring-up using caller-supplied buffers. --- #### add ```cpp bool add(Stream * s, uint8_t direction) ``` Add a Stream source to the console (typically a Serial port). --- #### remove ```cpp bool remove(Stream * s) ``` Remove a previously-added Stream. --- #### enableBinary ```cpp bool enableBinary() ``` Enable Binary frame parsing (caller must provide a buffer). --- #### disableBinary ```cpp bool disableBinary() ``` Disable Binary frame parsing. --- #### setBinaryBuffer ```cpp void setBinaryBuffer(char * buf, uint16_t len) ``` Set the buffer used to receive Binary frames. --- #### clearCommand ```cpp void clearCommand() ``` Discard any in-flight command. --- #### clearCallback ```cpp void clearCallback() ``` Remove the registered logging callback. --- #### setCallbackFunction ```cpp void setCallbackFunction(CallbackFunction f) ``` Register a callback invoked on log output. --- #### setCallbackStorage ```cpp void setCallbackStorage() ``` Use the default storage-callback (writes to the SD log). --- #### setCallbackLevel ```cpp void setCallbackLevel(uint8_t l) ``` Only invoke the callback for messages at this level or above. --- #### getCallbackLevel ```cpp uint8_t getCallbackLevel() ``` Current callback log-level threshold. --- #### doCallback ```cpp void doCallback(uint8_t l) ``` Manually fire the callback for a given level. --- #### setLevel ```cpp void setLevel(uint8_t in) ``` Set the console log-level threshold. --- #### getLevel `inline` ```cpp inline int8_t getLevel() ``` Current console log-level threshold. --- #### loop ```cpp void loop() ``` Tick: read from streams, parse frames, run timeouts. --- #### flush ```cpp void flush() ``` Flush all output streams. --- #### available ```cpp bool available() ``` True once a complete command frame has been received. --- #### getCommand `inline` ```cpp inline byte getCommand() ``` First byte of the most recent "X;" standard-style command. --- #### getVal `inline` ```cpp inline uint32_t getVal() ``` Numeric argument from the most recent "X;" command. --- #### getBuffer `inline` ```cpp inline char * getBuffer() ``` Raw command-buffer pointer. --- #### processCmd ```cpp void processCmd(char in) ``` Feed a byte into the standard-style command parser. --- #### processCsv ```cpp void processCsv() ``` Finalize parsing of a CSV (-prefixed) command frame. --- #### getCsvCount `inline` ```cpp inline uint8_t getCsvCount() ``` Number of CSV fields parsed in the current frame. --- #### getCsvVal `inline` ```cpp inline uint32_t getCsvVal(uint8_t n) ``` CSV field `n` interpreted as uint32. --- #### getCsvBuffer `inline` ```cpp inline char * getCsvBuffer(uint8_t n) ``` CSV field `n` as the original string. --- #### setDateTime `inline` ```cpp inline void setDateTime() ``` Enable date-time prefix on log output. --- #### clearDateTime `inline` ```cpp inline void clearDateTime() ``` Disable date-time prefix on log output. --- #### printDateTime ```cpp void printDateTime(uint32_t t) ``` Print a formatted date-time prefix (current time if t==0). --- #### print ```cpp void print(char * out) ``` Print a string to all output streams. --- #### sprintf ```cpp void sprintf(Stream * s, const __FlashStringHelper * out, ...) ``` printf to a single stream rather than all of them. --- #### printf ```cpp void printf(char * out, ...) ``` printf to all output streams (RAM format string). --- #### printf ```cpp void printf(const __FlashStringHelper * out, ...) ``` printf to all output streams (PROGMEM format string). --- #### printPrefix ```cpp void printPrefix(uint8_t level) ``` Emit the level-prefix string ("# INFO: " etc) for a level. --- #### log ```cpp void log(uint8_t l, char * out, ...) ``` Log a message at level `l` (RAM format string). --- #### log ```cpp void log(uint8_t l, const __FlashStringHelper * out, ...) ``` Log a message at level `l` (PROGMEM format string). --- #### safeLog ```cpp void safeLog(uint8_t l, char * out, ...) ``` --- #### safeLog ```cpp void safeLog(uint8_t l, const __FlashStringHelper * out, ...) ``` --- #### nmeaSend ```cpp void nmeaSend(const __FlashStringHelper * out, ...) ``` --- #### nmeaCRCSend ```cpp void nmeaCRCSend() ``` --- #### printNewLine ```cpp void printNewLine() ``` --- #### availableBin `inline` ```cpp inline bool availableBin() ``` --- #### getBinBuffer `inline` ```cpp inline char * getBinBuffer() ``` --- #### getBinLength `inline` ```cpp inline uint16_t getBinLength() ``` --- #### printBinary ```cpp void printBinary(char * buf, uint16_t len) ``` --- #### printBits ```cpp void printBits(void * buf, uint16_t len) ``` --- #### WII5Sh3dConsole `inline` ```cpp inline WII5Sh3dConsole() ``` --- #### setEcho ```cpp void setEcho(bool in) ``` --- #### getEcho ```cpp bool getEcho() ``` ### Protected Attributes | Return | Name | Description | |--------|------|-------------| | `bool` | [`echo`](#echo) | | | `elapsedMillis` | [`waitInput`](#waitinput) | | | `CallbackFunction` | [`callback`](#callback) | | | `int8_t` | [`callback_level`](#callback_level) | | | `bool` | [`callback_default`](#callback_default) | | | `Stream *` | [`streams`](#streams) | | | `uint8_t` | [`streamsDirection`](#streamsdirection) | | | `uint8_t` | [`streamCount`](#streamcount) | | | `int8_t` | [`level`](#level) | | | `bool` | [`displayDateTime`](#displaydatetime) | | | `uint8_t` | [`cmdType`](#cmdtype) | | | `uint8_t` | [`cmdCount`](#cmdcount) | | | `byte` | [`cmd`](#cmd) | | | `uint32_t` | [`val`](#val) | | | `char *` | [`cmdBuffer`](#cmdbuffer) | | | `char *` | [`csv_str`](#csv_str) | | | `uint32_t` | [`csv_uint32`](#csv_uint32) | | | `uint8_t` | [`csv_count`](#csv_count) | | | `uint8_t` | [`csv_last`](#csv_last) | | | `bool` | [`binAvailable`](#binavailable) | | | `char *` | [`binBuffer`](#binbuffer) | | | `uint16_t` | [`binMax`](#binmax) | | | `bool` | [`binEnable`](#binenable) | | | `uint16_t` | [`binReceiveCount`](#binreceivecount) | | | `uint16_t` | [`binReceiveExpect`](#binreceiveexpect) | | | `uint16_t` | [`binReceiveCRC`](#binreceivecrc) | | | `uint16_t` | [`consoleMax`](#consolemax) | | | `uint16_t` | [`i`](#i) | | --- #### echo ```cpp bool echo ``` --- #### waitInput ```cpp elapsedMillis waitInput ``` --- #### callback ```cpp CallbackFunction callback ``` --- #### callback_level ```cpp int8_t callback_level ``` --- #### callback_default ```cpp bool callback_default ``` --- #### streams ```cpp Stream * streams ``` --- #### streamsDirection ```cpp uint8_t streamsDirection ``` --- #### streamCount ```cpp uint8_t streamCount = 0 ``` --- #### level ```cpp int8_t level ``` --- #### displayDateTime ```cpp bool displayDateTime ``` --- #### cmdType ```cpp uint8_t cmdType ``` --- #### cmdCount ```cpp uint8_t cmdCount ``` --- #### cmd ```cpp byte cmd ``` --- #### val ```cpp uint32_t val ``` --- #### cmdBuffer ```cpp char * cmdBuffer ``` --- #### csv_str ```cpp char * csv_str ``` --- #### csv_uint32 ```cpp uint32_t csv_uint32 ``` --- #### csv_count ```cpp uint8_t csv_count ``` --- #### csv_last ```cpp uint8_t csv_last ``` --- #### binAvailable ```cpp bool binAvailable ``` --- #### binBuffer ```cpp char * binBuffer ``` --- #### binMax ```cpp uint16_t binMax ``` --- #### binEnable ```cpp bool binEnable ``` --- #### binReceiveCount ```cpp uint16_t binReceiveCount ``` --- #### binReceiveExpect ```cpp uint16_t binReceiveExpect ``` --- #### binReceiveCRC ```cpp uint16_t binReceiveCRC ``` --- #### consoleMax ```cpp uint16_t consoleMax ``` --- #### i ```cpp uint16_t i ``` ### Protected Methods | Return | Name | Description | |--------|------|-------------| | `void` | [`internalErrorNotEnoughMemory`](#internalerrornotenoughmemory) | | | `void` | [`internalErrorNoBufferStream`](#internalerrornobufferstream) | | | `bool` | [`check`](#check) | | --- #### internalErrorNotEnoughMemory ```cpp void internalErrorNotEnoughMemory() ``` --- #### internalErrorNoBufferStream ```cpp void internalErrorNoBufferStream() ``` --- #### check ```cpp bool check() ``` ## WII5ModePosition ```cpp #include ``` > **Inherits:** [`WII5Mode`](#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`](#wii5modeposition-3) `inline` | | | `void` | [`reset`](#reset-3) | Reset to WII5POSITION_START. | | `void` | [`begin`](#begin-20) `virtual` | One-time bring-up. | | `void` | [`loop`](#loop-12) `virtual` | State-machine tick. | | `void` | [`start`](#start-6) | Begin a position acquisition cycle. | | `void` | [`stop`](#stop-6) | Abort the current cycle. | --- #### WII5ModePosition `inline` ```cpp inline WII5ModePosition() ``` --- #### reset ```cpp void reset() ``` Reset to WII5POSITION_START. --- #### begin `virtual` ```cpp virtual void begin() ``` One-time bring-up. --- #### loop `virtual` ```cpp virtual void loop() ``` State-machine tick. --- #### start ```cpp void start() ``` Begin a position acquisition cycle. --- #### stop ```cpp void stop() ``` Abort the current cycle. ### Protected Attributes | Return | Name | Description | |--------|------|-------------| | `bool` | [`first`](#first-3) | | | `elapsedMillis` | [`displayWait`](#displaywait-2) | | | `elapsedMillis` | [`wait`](#wait-2) | | | `WII5POSITION_STEPS` | [`step`](#step-7) | | | `WII5POSITION_STEPS` | [`lastStep`](#laststep-1) | | | `uint32_t` | [`minutes`](#minutes-3) | | --- #### first ```cpp bool first ``` --- #### displayWait ```cpp elapsedMillis displayWait ``` --- #### wait ```cpp elapsedMillis wait ``` --- #### step ```cpp WII5POSITION_STEPS step ``` --- #### lastStep ```cpp WII5POSITION_STEPS lastStep ``` --- #### minutes ```cpp uint32_t minutes ``` ## WII5ModeSelfTest ```cpp #include ``` > **Inherits:** [`WII5Mode`](#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`](#wii5modeselftest-3) `inline` | | | `void` | [`reset`](#reset-4) | Reset to WII5ST_START. | | `void` | [`begin`](#begin-21) `virtual` | One-time bring-up. | | `void` | [`loop`](#loop-13) `virtual` | Run the next test step (called repeatedly while active). | | `void` | [`dump`](#dump-4) | Print the results table; `toOther` optionally mirrors elsewhere. | | `WII5SELFTEST_MODE` | [`getMode`](#getmode-1) | Current self-test submode. | | `void` | [`setMode`](#setmode-1) | Select self-test submode. | --- #### WII5ModeSelfTest `inline` ```cpp inline WII5ModeSelfTest() ``` --- #### reset ```cpp void reset() ``` Reset to WII5ST_START. --- #### begin `virtual` ```cpp virtual void begin() ``` One-time bring-up. --- #### loop `virtual` ```cpp virtual void loop() ``` Run the next test step (called repeatedly while active). --- #### dump ```cpp void dump(bool toConsole, Print * toOther, bool hideNone) ``` Print the results table; `toOther` optionally mirrors elsewhere. --- #### getMode ```cpp WII5SELFTEST_MODE getMode() ``` Current self-test submode. --- #### setMode ```cpp void setMode(WII5SELFTEST_MODE m) ``` Select self-test submode. ### Protected Attributes | Return | Name | Description | |--------|------|-------------| | `WII5SELFTEST_MODE` | [`mode`](#mode-1) | | | `elapsedMillis` | [`wait`](#wait-3) | | | `WII5SELFTEST_STEPS` | [`step`](#step-8) | | | `WII5SELFTEST_STEPS` | [`stepLast`](#steplast-5) | | | `elapsedMillis` | [`stepWait`](#stepwait-6) | | | `uint32_t` | [`stepCount`](#stepcount-2) | | | `bool` | [`first`](#first-4) | | | `uint16_t` | [`count`](#count) | | | `uint16_t` | [`count_passed`](#count_passed) | | | `uint16_t` | [`count_failed`](#count_failed) | | | `uint16_t` | [`count_nonenc`](#count_nonenc) | | | `WII5SELFTEST_STATUS` | [`results`](#results) | | --- #### mode ```cpp WII5SELFTEST_MODE mode ``` --- #### wait ```cpp elapsedMillis wait ``` --- #### step ```cpp WII5SELFTEST_STEPS step ``` --- #### stepLast ```cpp WII5SELFTEST_STEPS stepLast ``` --- #### stepWait ```cpp elapsedMillis stepWait ``` --- #### stepCount ```cpp uint32_t stepCount ``` --- #### first ```cpp bool first ``` --- #### count ```cpp uint16_t count ``` --- #### count_passed ```cpp uint16_t count_passed ``` --- #### count_failed ```cpp uint16_t count_failed ``` --- #### count_nonenc ```cpp uint16_t count_nonenc ``` --- #### results ```cpp WII5SELFTEST_STATUS results ``` ## WII5SerialManager ```cpp #include ``` > **Subclassed by:** [`WII5GPS`](#wii5gps-2), [`WII5Iridium`](#wii5iridium-2) ### Public Attributes | Return | Name | Description | |--------|------|-------------| | `TinyGPSPlus *` | [`gps`](#gps) | | | `char *` | [`buffer`](#buffer) | | | `char *` | [`binBuffer`](#binbuffer-1) | | | `uint16_t` | [`binBufferCount`](#binbuffercount) | | | `uint16_t` | [`binBufferExpect`](#binbufferexpect) | | --- #### gps ```cpp TinyGPSPlus * gps ``` --- #### buffer ```cpp char * buffer ``` --- #### binBuffer ```cpp char * binBuffer ``` --- #### binBufferCount ```cpp uint16_t binBufferCount ``` --- #### binBufferExpect ```cpp uint16_t binBufferExpect ``` ### Public Methods | Return | Name | Description | |--------|------|-------------| | | [`WII5SerialManager`](#wii5serialmanager-1) `inline` | | | `WII5_DRIVERS` | [`driverId`](#driverid-8) `virtual` | | | `void` | [`loop`](#loop-14) `virtual` | | | `void` | [`beginSerialManager`](#beginserialmanager) | | | `void` | [`endSerialManager`](#endserialmanager) | | | `void` | [`setPassthrough`](#setpassthrough-1) | | | `bool` | [`getPassthrough`](#getpassthrough-1) | | | `void` | [`setDebug`](#setdebug-2) | | | `bool` | [`getDebug`](#getdebug-2) | | | `void` | [`setCapture`](#setcapture-1) | | | `bool` | [`getCapture`](#getcapture-1) | | | `void` | [`repl`](#repl-1) | | | `void` | [`sendNewLine`](#sendnewline-1) `virtual` | | | `WII5_SERIALCMDS` | [`sendAll`](#sendall) | | | `WII5_SERIALCMDS` | [`sendAndWait`](#sendandwait) | | | `void` | [`setBaudrate`](#setbaudrate-1) `virtual` | | | `void` | [`start`](#start-7) `virtual` | | | `void` | [`stop`](#stop-7) `virtual` | | | `void` | [`setRecords`](#setrecords-1) `virtual` | | | `uint32_t` | [`getRecords`](#getrecords-1) `virtual` | | | `void` | [`writePassthrough`](#writepassthrough) `virtual` | | | `void` | [`writeCapture`](#writecapture) `virtual` | | | `void` | [`enableNmea`](#enablenmea) | | | `void` | [`sendAtDataLine`](#sendatdataline) `virtual` | | | `void` | [`setTimeout`](#settimeout) | | | `uint32_t` | [`getTimeout`](#gettimeout) | | --- #### WII5SerialManager `inline` ```cpp inline WII5SerialManager() ``` --- #### driverId `virtual` ```cpp virtual WII5_DRIVERS driverId() ``` --- #### loop `virtual` ```cpp virtual void loop() ``` --- #### beginSerialManager ```cpp void beginSerialManager() ``` --- #### endSerialManager ```cpp void endSerialManager() ``` --- #### setPassthrough ```cpp void setPassthrough(bool in) ``` --- #### getPassthrough ```cpp bool getPassthrough() ``` --- #### setDebug ```cpp void setDebug(bool in) ``` --- #### getDebug ```cpp bool getDebug() ``` --- #### setCapture ```cpp void setCapture(bool in) ``` --- #### getCapture ```cpp bool getCapture() ``` --- #### repl ```cpp void repl(uint32_t baud) ``` --- #### sendNewLine `virtual` ```cpp virtual void sendNewLine() ``` --- #### sendAll ```cpp WII5_SERIALCMDS sendAll(WII5SERIAL_LAST lastUntil) ``` --- #### sendAndWait ```cpp WII5_SERIALCMDS sendAndWait(WII5SERIAL_LAST lastUntil) ``` --- #### setBaudrate `virtual` ```cpp virtual void setBaudrate(uint32_t baud) ``` --- #### start `virtual` ```cpp virtual void start(bool force) ``` --- #### stop `virtual` ```cpp virtual void stop(bool force) ``` --- #### setRecords `virtual` ```cpp virtual void setRecords(uint32_t in) ``` --- #### getRecords `virtual` ```cpp virtual uint32_t getRecords() ``` --- #### writePassthrough `virtual` ```cpp virtual void writePassthrough() ``` --- #### writeCapture `virtual` ```cpp virtual void writeCapture() ``` --- #### enableNmea ```cpp void enableNmea() ``` --- #### sendAtDataLine `virtual` ```cpp virtual void sendAtDataLine() ``` --- #### setTimeout ```cpp void setTimeout(uint32_t in) ``` --- #### getTimeout ```cpp uint32_t getTimeout() ``` ### Protected Attributes | Return | Name | Description | |--------|------|-------------| | `HardwareSerial *` | [`stream`](#stream) | | | `bool` | [`capture`](#capture-1) | | | `bool` | [`passthrough`](#passthrough) | | | `bool` | [`debug`](#debug-3) | | | `uint32_t` | [`sendCount`](#sendcount-1) | | | `elapsedMillis` | [`processWait`](#processwait) | | | `uint32_t` | [`processTimeout`](#processtimeout) | | | `uint8_t` | [`bufMax`](#bufmax) | | | `char` | [`fieldBuffer`](#fieldbuffer) | | | `uint8_t` | [`bufCount`](#bufcount) | | | `uint8_t` | [`fieldLoc`](#fieldloc) | | | `uint8_t` | [`fieldCount`](#fieldcount) | | | `WII5SERIAL_PARSERS` | [`processMode`](#processmode-1) | | | `uint8_t` | [`programCount`](#programcount) | | | `uint8_t` | [`programTotal`](#programtotal) | | | `uint32_t` | [`recordCount`](#recordcount-3) | | | `uint32_t` | [`recordTotal`](#recordtotal-1) | | | `WII5SERIAL_LAST` | [`last`](#last-2) | | | `uint32_t` | [`lastVal`](#lastval) | | | `uint32_t` | [`recordVals`](#recordvals) | | | `char *` | [`p`](#p-1) | | --- #### stream ```cpp HardwareSerial * stream ``` --- #### capture ```cpp bool capture ``` --- #### passthrough ```cpp bool passthrough ``` --- #### debug ```cpp bool debug ``` --- #### sendCount ```cpp uint32_t sendCount ``` --- #### processWait ```cpp elapsedMillis processWait ``` --- #### processTimeout ```cpp uint32_t processTimeout ``` --- #### bufMax ```cpp uint8_t bufMax ``` --- #### fieldBuffer ```cpp char fieldBuffer ``` --- #### bufCount ```cpp uint8_t bufCount ``` --- #### fieldLoc ```cpp uint8_t fieldLoc ``` --- #### fieldCount ```cpp uint8_t fieldCount ``` --- #### processMode ```cpp WII5SERIAL_PARSERS processMode ``` --- #### programCount ```cpp uint8_t programCount ``` --- #### programTotal ```cpp uint8_t programTotal ``` --- #### recordCount ```cpp uint32_t recordCount ``` --- #### recordTotal ```cpp uint32_t recordTotal ``` --- #### last ```cpp WII5SERIAL_LAST last ``` --- #### lastVal ```cpp uint32_t lastVal ``` --- #### recordVals ```cpp uint32_t recordVals ``` --- #### p ```cpp char * p ``` ### Protected Methods | Return | Name | Description | |--------|------|-------------| | `bool` | [`processSerial`](#processserial) `virtual` | | | `void` | [`processBufferField`](#processbufferfield) `virtual` | | | `void` | [`processBufferOK`](#processbufferok) `virtual` | | | `void` | [`processBufferLine`](#processbufferline) `virtual` | | | `void` | [`processRecord`](#processrecord) `virtual` | | | `void` | [`programLine`](#programline-2) `virtual` | | | `void` | [`sendLine`](#sendline-1) `virtual` | | | `void` | [`consolePrefix`](#consoleprefix) `virtual` | | | `void` | [`consoleBuffer`](#consolebuffer) `virtual` | | | `void` | [`setBuffer`](#setbuffer) `virtual` | | --- #### processSerial `virtual` ```cpp virtual bool processSerial(char in) ``` --- #### processBufferField `virtual` ```cpp virtual void processBufferField(char * buf, uint8_t len) ``` --- #### processBufferOK `virtual` ```cpp virtual void processBufferOK() ``` --- #### processBufferLine `virtual` ```cpp virtual void processBufferLine() ``` --- #### processRecord `virtual` ```cpp virtual void processRecord() ``` --- #### programLine `virtual` ```cpp virtual void programLine(uint16_t l) ``` --- #### sendLine `virtual` ```cpp virtual void sendLine(uint16_t l) ``` --- #### consolePrefix `virtual` ```cpp virtual void consolePrefix(bool input) ``` --- #### consoleBuffer `virtual` ```cpp virtual void consoleBuffer(bool input, bool useLog) ``` --- #### setBuffer `virtual` ```cpp virtual void setBuffer(char * buf, uint8_t sz) ``` ## WII5Communications ```cpp #include ``` > **Inherits:** [`WII5Mode`](#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`](#wii5communications-3) `inline` | | | `bool` | [`isRunning`](#isrunning-5) | Is the comms state machine actively in a send/receive cycle? | | `void` | [`begin`](#begin-22) `virtual` | One-time bring-up. | | `void` | [`loop`](#loop-15) `virtual` | State-machine tick: drives Iridium and SD interactions. | | `void` | [`start`](#start-8) | Begin a new comms cycle (send pending data). | | `void` | [`stop`](#stop-8) | Abort the current comms cycle and idle. | | `void` | [`signalSD`](#signalsd) | Hint to autoMode that the SD card has fresh data worth scanning. | | `void` | [`sendBinModeType`](#sendbinmodetype) | Queue a BinData message of type `t`, optionally pulled from given SD blocks. | | `void` | [`sendText`](#sendtext) | Send arbitrary buffered text (bypasses the BinData frame). | | `void` | [`sendError`](#senderror) | Send the most recent error as an SBD message. | | `void` | [`findRecord`](#findrecord) | Find an SD record matching (binType, recordCount) for retransmission. | | `void` | [`setTESTING`](#settesting) | Enable test mode (no real Iridium traffic). | | `void` | [`setAutoMode`](#setautomode) | Enable autoMode: periodically scan SD and push new data. | | `void` | [`setSimpleMode`](#setsimplemode) | Enable simpleMode: send only what is explicitly requested. | | `bool` | [`getAutoMode`](#getautomode) | Is autoMode currently the active mode? | | `bool` | [`getSimpleMode`](#getsimplemode) | Is simpleMode currently the active mode? | | `bool` | [`setDisabled`](#setdisabled) | Master enable/disable; returns previous state. | --- #### WII5Communications `inline` ```cpp inline WII5Communications() ``` --- #### isRunning ```cpp bool isRunning() ``` Is the comms state machine actively in a send/receive cycle? --- #### begin `virtual` ```cpp virtual void begin() ``` One-time bring-up. --- #### loop `virtual` ```cpp virtual void loop() ``` State-machine tick: drives Iridium and SD interactions. --- #### start ```cpp void start() ``` Begin a new comms cycle (send pending data). --- #### stop ```cpp void stop() ``` Abort the current comms cycle and idle. --- #### signalSD ```cpp void signalSD() ``` Hint to autoMode that the SD card has fresh data worth scanning. --- #### sendBinModeType ```cpp 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 ```cpp void sendText(void * buf, uint16_t bufSize) ``` Send arbitrary buffered text (bypasses the BinData frame). --- #### sendError ```cpp void sendError() ``` Send the most recent error as an SBD message. --- #### findRecord ```cpp void findRecord(uint32_t t, uint32_t recordCount) ``` Find an SD record matching (binType, recordCount) for retransmission. --- #### setTESTING ```cpp void setTESTING() ``` Enable test mode (no real Iridium traffic). --- #### setAutoMode ```cpp void setAutoMode() ``` Enable autoMode: periodically scan SD and push new data. --- #### setSimpleMode ```cpp void setSimpleMode() ``` Enable simpleMode: send only what is explicitly requested. --- #### getAutoMode ```cpp bool getAutoMode() ``` Is autoMode currently the active mode? --- #### getSimpleMode ```cpp bool getSimpleMode() ``` Is simpleMode currently the active mode? --- #### setDisabled ```cpp bool setDisabled(bool in) ``` Master enable/disable; returns previous state. ### Protected Attributes | Return | Name | Description | |--------|------|-------------| | `bool` | [`disabled`](#disabled) | | | `bool` | [`autoMode`](#automode) | | | `bool` | [`metadataScan`](#metadatascan) | | | `bool` | [`testMode`](#testmode) | | | `elapsedMillis` | [`lastSuccess`](#lastsuccess) | | | `elapsedMillis` | [`requestWait`](#requestwait) | | | `uint32_t` | [`requestBinType`](#requestbintype) | | | `uint32_t` | [`requestRecordCount`](#requestrecordcount) | | | `uint32_t` | [`requestMetadataBlock`](#requestmetadatablock) | | | `uint32_t` | [`requestResultsBlock`](#requestresultsblock) | | | `uint8_t` | [`sdCardId`](#sdcardid) | | | `bool` | [`updateStatus`](#updatestatus) | | | `uint32_t` | [`sdStartBlock`](#sdstartblock) | | | `uint32_t` | [`sdCurrentBlock`](#sdcurrentblock) | | | `uint8_t` | [`countSucces`](#countsucces) | | | `uint8_t` | [`countFailed`](#countfailed) | | | `uint16_t` | [`countSend`](#countsend) | | | `bool` | [`waitStatus`](#waitstatus) | | | `uint32_t` | [`sdDone`](#sddone) | | | `uint32_t` | [`sdTried`](#sdtried) | | | `uint32_t` | [`findBinType`](#findbintype) | | | `uint32_t` | [`findRecordCount`](#findrecordcount) | | | `bool` | [`first`](#first-5) | | | `elapsedMillis` | [`displayWait`](#displaywait-3) | | | `elapsedMillis` | [`wait`](#wait-4) | | | `WII5COMMUNICATIONS_STEPS` | [`step`](#step-9) | | | `WII5COMMUNICATIONS_STEPS` | [`lastStep`](#laststep-2) | | | `uint32_t` | [`minutes`](#minutes-4) | | | `uint8_t` | [`binNextBit`](#binnextbit) | | | `uint8_t` | [`binCount`](#bincount) | | | `uint32_t` | [`binType`](#bintype) | | | `uint32_t` | [`mainBinType`](#mainbintype) | | | `uint32_t` | [`metadataBlock`](#metadatablock) | | | `uint32_t` | [`resultsBlock`](#resultsblock) | | | `uint32_t` | [`mainRecordCount`](#mainrecordcount) | | --- #### disabled ```cpp bool disabled ``` --- #### autoMode ```cpp bool autoMode ``` --- #### metadataScan ```cpp bool metadataScan ``` --- #### testMode ```cpp bool testMode ``` --- #### lastSuccess ```cpp elapsedMillis lastSuccess ``` --- #### requestWait ```cpp elapsedMillis requestWait ``` --- #### requestBinType ```cpp uint32_t requestBinType ``` --- #### requestRecordCount ```cpp uint32_t requestRecordCount ``` --- #### requestMetadataBlock ```cpp uint32_t requestMetadataBlock ``` --- #### requestResultsBlock ```cpp uint32_t requestResultsBlock ``` --- #### sdCardId ```cpp uint8_t sdCardId ``` --- #### updateStatus ```cpp bool updateStatus ``` --- #### sdStartBlock ```cpp uint32_t sdStartBlock ``` --- #### sdCurrentBlock ```cpp uint32_t sdCurrentBlock ``` --- #### countSucces ```cpp uint8_t countSucces ``` --- #### countFailed ```cpp uint8_t countFailed ``` --- #### countSend ```cpp uint16_t countSend ``` --- #### waitStatus ```cpp bool waitStatus ``` --- #### sdDone ```cpp uint32_t sdDone ``` --- #### sdTried ```cpp uint32_t sdTried ``` --- #### findBinType ```cpp uint32_t findBinType ``` --- #### findRecordCount ```cpp uint32_t findRecordCount ``` --- #### first ```cpp bool first ``` --- #### displayWait ```cpp elapsedMillis displayWait ``` --- #### wait ```cpp elapsedMillis wait ``` --- #### step ```cpp WII5COMMUNICATIONS_STEPS step ``` --- #### lastStep ```cpp WII5COMMUNICATIONS_STEPS lastStep ``` --- #### minutes ```cpp uint32_t minutes ``` --- #### binNextBit ```cpp uint8_t binNextBit ``` --- #### binCount ```cpp uint8_t binCount ``` --- #### binType ```cpp uint32_t binType ``` --- #### mainBinType ```cpp uint32_t mainBinType ``` --- #### metadataBlock ```cpp uint32_t metadataBlock ``` --- #### resultsBlock ```cpp uint32_t resultsBlock ``` --- #### mainRecordCount ```cpp uint32_t mainRecordCount ``` ## WII5ModeLowBattery ```cpp #include ``` > **Inherits:** [`WII5Mode`](#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`](#wii5modelowbattery-3) `inline` | | | `void` | [`reset`](#reset-5) | Reset to WII5LOWBATTERY_START. | | `void` | [`begin`](#begin-23) `virtual` | One-time bring-up. | | `void` | [`loop`](#loop-16) `virtual` | State-machine tick. | | `void` | [`start`](#start-9) | Begin a low-battery alert cycle. | | `void` | [`stop`](#stop-9) | Abort the current cycle. | --- #### WII5ModeLowBattery `inline` ```cpp inline WII5ModeLowBattery() ``` --- #### reset ```cpp void reset() ``` Reset to WII5LOWBATTERY_START. --- #### begin `virtual` ```cpp virtual void begin() ``` One-time bring-up. --- #### loop `virtual` ```cpp virtual void loop() ``` State-machine tick. --- #### start ```cpp void start() ``` Begin a low-battery alert cycle. --- #### stop ```cpp void stop() ``` Abort the current cycle. ### Protected Attributes | Return | Name | Description | |--------|------|-------------| | `bool` | [`first`](#first-6) | | | `elapsedMillis` | [`displayWait`](#displaywait-4) | | | `elapsedMillis` | [`wait`](#wait-5) | | | `WII5LOWBATTERY_STEPS` | [`step`](#step-10) | | | `WII5LOWBATTERY_STEPS` | [`lastStep`](#laststep-3) | | | `uint32_t` | [`minutes`](#minutes-5) | | --- #### first ```cpp bool first ``` --- #### displayWait ```cpp elapsedMillis displayWait ``` --- #### wait ```cpp elapsedMillis wait ``` --- #### step ```cpp WII5LOWBATTERY_STEPS step ``` --- #### lastStep ```cpp WII5LOWBATTERY_STEPS lastStep ``` --- #### minutes ```cpp uint32_t minutes ``` ## WII5ModeManualTest ```cpp #include ``` > **Inherits:** [`WII5Mode`](#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`](#enablemetadata) | | | `bool` | [`enableIridium`](#enableiridium) | | | `bool` | [`enableGps`](#enablegps-1) | | | `bool` | [`enableSparton`](#enablesparton) | | | `bool` | [`enableBattery`](#enablebattery) | | | `bool` | [`waitGPS`](#waitgps) | | --- #### enableMetadata ```cpp bool enableMetadata ``` --- #### enableIridium ```cpp bool enableIridium ``` --- #### enableGps ```cpp bool enableGps ``` --- #### enableSparton ```cpp bool enableSparton ``` --- #### enableBattery ```cpp bool enableBattery ``` --- #### waitGPS ```cpp bool waitGPS ``` ### Public Methods | Return | Name | Description | |--------|------|-------------| | | [`WII5ModeManualTest`](#wii5modemanualtest-3) `inline` | | | `void` | [`reset`](#reset-6) | Reset internal counters. | | `void` | [`begin`](#begin-24) `virtual` | One-time bring-up. | | `void` | [`loop`](#loop-17) `virtual` | Tick: read console, dispatch one-shot test commands. | --- #### WII5ModeManualTest `inline` ```cpp inline WII5ModeManualTest() ``` --- #### reset ```cpp void reset() ``` Reset internal counters. --- #### begin `virtual` ```cpp virtual void begin() ``` One-time bring-up. --- #### loop `virtual` ```cpp virtual void loop() ``` Tick: read console, dispatch one-shot test commands. ### Protected Attributes | Return | Name | Description | |--------|------|-------------| | `elapsedMillis` | [`wait`](#wait-6) | | | `uint8_t` | [`pulsePin`](#pulsepin) | | | `elapsedMillis` | [`pulseWait`](#pulsewait) | | --- #### wait ```cpp elapsedMillis wait ``` --- #### pulsePin ```cpp uint8_t pulsePin ``` --- #### pulseWait ```cpp elapsedMillis pulseWait ``` ## WII5Weather_18B20 ```cpp #include ``` > **Inherits:** [`WII5Power`](#wii5power) ### Public Attributes | Return | Name | Description | |--------|------|-------------| | `elapsedMillis` | [`age`](#age-2) | | | `int32_t` | [`value`](#value-1) | | --- #### age ```cpp elapsedMillis age ``` --- #### value ```cpp int32_t value ``` ### Public Methods | Return | Name | Description | |--------|------|-------------| | | [`WII5Weather_18B20`](#wii5weather_18b20-3) `inline` | | | `WII5_CONTROLLERS` | [`controllerId`](#controllerid-14) `virtual` `inline` | Identify the controller category for logging/status. | | `WII5_DRIVERS` | [`driverId`](#driverid-9) `virtual` `inline` | Identify the driver category for logging/status. | | `void` | [`begin`](#begin-25) | | | `void` | [`loop`](#loop-18) | | | `bool` | [`temperatureRead`](#temperatureread) | | --- #### WII5Weather_18B20 `inline` ```cpp inline WII5Weather_18B20() ``` --- #### controllerId `virtual` `inline` ```cpp virtual inline WII5_CONTROLLERS controllerId() ``` Identify the controller category for logging/status. --- #### driverId `virtual` `inline` ```cpp virtual inline WII5_DRIVERS driverId() ``` Identify the driver category for logging/status. --- #### begin ```cpp void begin() ``` --- #### loop ```cpp void loop() ``` --- #### temperatureRead ```cpp bool temperatureRead() ``` ### Protected Attributes | Return | Name | Description | |--------|------|-------------| | `byte` | [`data`](#data) | | | `byte` | [`addr`](#addr) | | | `float` | [`currentTemperature`](#currenttemperature) | | | `elapsedMillis` | [`stepWait`](#stepwait-7) | | --- #### data ```cpp byte data ``` --- #### addr ```cpp byte addr ``` --- #### currentTemperature ```cpp float currentTemperature ``` --- #### stepWait ```cpp elapsedMillis stepWait ``` ## typeConfig ```cpp #include ``` ### Public Attributes | Return | Name | Description | |--------|------|-------------| | `SH3D_TYPE_PACKET_TYPE` | [`configType`](#configtype) | | | `SH3D_TYPE_PACKET_VERSION` | [`configVersion`](#configversion) | | | `SH3D_TYPE_UNIQUEID` | [`nodeId`](#nodeid) | | | `SH3D_TYPE_COUNTER` | [`runCount`](#runcount) | | | `SH3D_TYPE_COUNTER` | [`recordCount`](#recordcount) | | | `SH3D_TYPE_COUNTER` | [`storageLogLast`](#storageloglast) | | | `SH3D_TYPE_COUNTER` | [`storageSensorLast`](#storagesensorlast) | | --- #### configType ```cpp SH3D_TYPE_PACKET_TYPE configType ``` --- #### configVersion ```cpp SH3D_TYPE_PACKET_VERSION configVersion ``` --- #### nodeId ```cpp SH3D_TYPE_UNIQUEID nodeId ``` --- #### runCount ```cpp SH3D_TYPE_COUNTER runCount ``` --- #### recordCount ```cpp SH3D_TYPE_COUNTER recordCount ``` --- #### storageLogLast ```cpp SH3D_TYPE_COUNTER storageLogLast ``` --- #### storageSensorLast ```cpp SH3D_TYPE_COUNTER storageSensorLast ``` ## WII5Command ```cpp #include ``` ### Public Attributes | Return | Name | Description | |--------|------|-------------| | `uint32_t` | [`deviceId`](#deviceid) | | | `uint32_t` | [`recordCount`](#recordcount-2) | | | `time_t` | [`last`](#last) | | | `uint32_t` | [`age`](#age-1) | | | `uint32_t` | [`uptime`](#uptime) | | --- #### deviceId ```cpp uint32_t deviceId ``` --- #### recordCount ```cpp uint32_t recordCount ``` --- #### last ```cpp time_t last ``` --- #### age ```cpp uint32_t age ``` --- #### uptime ```cpp uint32_t uptime ``` ## WII5Processed ```cpp #include ``` ### Public Attributes | Return | Name | Description | |--------|------|-------------| | `WII5Processed1` | [`processed1`](#processed1) | | | `WII5Processed2` | [`processed2`](#processed2) | | --- #### processed1 ```cpp WII5Processed1 processed1 ``` --- #### processed2 ```cpp WII5Processed2 processed2 ``` ## WII5Processed1 ```cpp #include ``` ### Public Attributes | Return | Name | Description | |--------|------|-------------| | `float` | [`part1float`](#part1float) | | --- #### part1float ```cpp float part1float ``` ## WII5Processed2 ```cpp #include ``` ### Public Attributes | Return | Name | Description | |--------|------|-------------| | `float` | [`part2float`](#part2float) | | | `int` | [`part2int`](#part2int) | | --- #### part2float ```cpp float part2float ``` --- #### part2int ```cpp int part2int ``` ## WII5_BINDATA_0 ```cpp #include ``` ### Public Attributes | Return | Name | Description | |--------|------|-------------| | `uint32_t` | [`status`](#status) | | | `time_t` | [`last`](#last-1) | | | `int16_t` | [`voltage`](#voltage) | | | `int16_t` | [`temperature`](#temperature) | | | `uint8_t` | [`mode`](#mode-2) | | | `float` | [`gps_lat`](#gps_lat) | | | `float` | [`gps_lon`](#gps_lon) | | --- #### status ```cpp uint32_t status ``` --- #### last ```cpp time_t last ``` --- #### voltage ```cpp int16_t voltage ``` --- #### temperature ```cpp int16_t temperature ``` --- #### mode ```cpp uint8_t mode ``` --- #### gps_lat ```cpp float gps_lat ``` --- #### gps_lon ```cpp float gps_lon ``` ## WII5_BINDATA_1 ```cpp #include ``` ### Public Attributes | Return | Name | Description | |--------|------|-------------| | `uint16_t` | [`lastRunTime`](#lastruntime-3) | | | `time_t` | [`when`](#when-2) | | | `int16_t` | [`altitude`](#altitude) | | | `uint8_t` | [`satellites`](#satellites) | | | `float` | [`hdop`](#hdop) | | --- #### lastRunTime ```cpp uint16_t lastRunTime ``` --- #### when ```cpp time_t when ``` --- #### altitude ```cpp int16_t altitude ``` --- #### satellites ```cpp uint8_t satellites ``` --- #### hdop ```cpp float hdop ``` ## WII5_BINDATA_2 ```cpp #include ``` ### Public Attributes | Return | Name | Description | |--------|------|-------------| | `uint16_t` | [`lastRunTime`](#lastruntime-4) | | | `uint8_t` | [`signalQuality`](#signalquality) | | --- #### lastRunTime ```cpp uint16_t lastRunTime ``` --- #### signalQuality ```cpp uint8_t signalQuality ``` ## WII5_BINDATA_3 ```cpp #include ``` ### Public Attributes | Return | Name | Description | |--------|------|-------------| | `uint32_t` | [`status`](#status-1) | | | `uint32_t` | [`command`](#command) | | | `uint8_t` | [`id`](#id) | | | `uint8_t` | [`response`](#response) | | | `char` | [`message`](#message) | | --- #### status ```cpp uint32_t status ``` --- #### command ```cpp uint32_t command ``` --- #### id ```cpp uint8_t id ``` --- #### response ```cpp uint8_t response ``` --- #### message ```cpp char message ``` ## WII5_BINDATA_4 ```cpp #include ``` ### Public Attributes | Return | Name | Description | |--------|------|-------------| | `char` | [`message`](#message-1) | | --- #### message ```cpp char message ``` ## WII5_BINDATA_5 ```cpp #include ``` ### Public Attributes | Return | Name | Description | |--------|------|-------------| | `uint32_t` | [`runCount`](#runcount-1) | | | `uint32_t` | [`integerVersion`](#integerversion) | | --- #### runCount ```cpp uint32_t runCount ``` --- #### integerVersion ```cpp uint32_t integerVersion ``` ## WII5_BINDATA_6 ```cpp #include ``` ### Public Attributes | Return | Name | Description | |--------|------|-------------| | `float` | [`qf_mvar`](#qf_mvar) | | | `float` | [`qf_p_accel`](#qf_p_accel) | | | `float` | [`qf_imu`](#qf_imu) | | | `float` | [`qf_head`](#qf_head) | | | `float` | [`a`](#a) | | | `float` | [`b`](#b) | | --- #### qf_mvar ```cpp float qf_mvar ``` --- #### qf_p_accel ```cpp float qf_p_accel ``` --- #### qf_imu ```cpp float qf_imu ``` --- #### qf_head ```cpp float qf_head ``` --- #### a ```cpp float a ``` --- #### b ```cpp float b ``` ## WII5_BINDATA_7 ```cpp #include ``` ### Public Attributes | Return | Name | Description | |--------|------|-------------| | `float` | [`tz_max`](#tz_max) | | | `float` | [`htm_max`](#htm_max) | | | `float` | [`hcm_max`](#hcm_max) | | | `float` | [`hz_max`](#hz_max) | | --- #### tz_max ```cpp float tz_max ``` --- #### htm_max ```cpp float htm_max ``` --- #### hcm_max ```cpp float hcm_max ``` --- #### hz_max ```cpp float hz_max ``` ## WII5_BINDATA_8 ```cpp #include ``` ### Public Attributes | Return | Name | Description | |--------|------|-------------| | `WII5Processed1` | [`processed1`](#processed1-1) | | --- #### processed1 ```cpp WII5Processed1 processed1 ``` ## WII5_BINDATA_9 ```cpp #include ``` ### Public Attributes | Return | Name | Description | |--------|------|-------------| | `WII5Processed2` | [`processed2`](#processed2-1) | | --- #### processed2 ```cpp WII5Processed2 processed2 ``` ## WII5_BINDATA_10 ```cpp #include ``` ### Public Attributes | Return | Name | Description | |--------|------|-------------| | `WII5MetaDataObject` | [`metadata`](#metadata-1) | | --- #### metadata ```cpp WII5MetaDataObject metadata ``` ## WII5_BINDATA_11 ```cpp #include ``` ### Public Attributes | Return | Name | Description | |--------|------|-------------| | `int` | [`direction`](#direction) | | --- #### direction ```cpp int direction ``` ## WII5_BINDATA_12 ```cpp #include ``` ### Public Attributes | Return | Name | Description | |--------|------|-------------| | `float` | [`hmo`](#hmo) | | | `float` | [`theta`](#theta) | | | `float` | [`dp`](#dp) | | | `float` | [`s`](#s) | | | `float` | [`r`](#r) | | | `float` | [`nstd`](#nstd) | | | `float` | [`f2`](#f2) | | | `float` | [`yaw_std`](#yaw_std) | | | `float` | [`open_water`](#open_water) | | | `float` | [`power_diff`](#power_diff) | | | `float` | [`tp`](#tp) | | --- #### hmo ```cpp float hmo ``` --- #### theta ```cpp float theta ``` --- #### dp ```cpp float dp ``` --- #### s ```cpp float s ``` --- #### r ```cpp float r ``` --- #### nstd ```cpp float nstd ``` --- #### f2 ```cpp float f2 ``` --- #### yaw_std ```cpp float yaw_std ``` --- #### open_water ```cpp float open_water ``` --- #### power_diff ```cpp float power_diff ``` --- #### tp ```cpp float tp ``` ## WII5_BINDATA_13 ```cpp #include ``` ### Public Attributes | Return | Name | Description | |--------|------|-------------| | `float` | [`moments`](#moments) | | --- #### moments ```cpp float moments ``` ## WII5_BINDATA_14 ```cpp #include ``` ### Public Attributes | Return | Name | Description | |--------|------|-------------| | `float` | [`psd`](#psd) | | --- #### psd ```cpp float psd ``` ## WII5_BINDATA_15 ```cpp #include ``` ## WII5_Data_Config ```cpp #include ``` ### Public Attributes | Return | Name | Description | |--------|------|-------------| | `uint8_t` | [`type`](#type) | | | `uint8_t` | [`version`](#version) | | | `time_t` | [`disableLowBattery`](#disablelowbattery) | | | `uint32_t` | [`flags`](#flags) | | | `uint32_t` | [`gpsTimeout`](#gpstimeout) | | | `uint32_t` | [`capturePeriod`](#captureperiod) | | | `uint32_t` | [`captureBinaryType`](#capturebinarytype) | | | `uint32_t` | [`captureRecords`](#capturerecords) | | | `uint32_t` | [`positionPeriod`](#positionperiod) | | | `uint32_t` | [`positionBinaryType`](#positionbinarytype) | | | `uint32_t` | [`sleepPeriod`](#sleepperiod) | | | `uint32_t` | [`sleepBinaryType`](#sleepbinarytype) | | | `uint32_t` | [`sleepMaths`](#sleepmaths) | | | `WII5_MODES` | [`defaultMode`](#defaultmode) | | | `WII5_MODES` | [`temporaryMode`](#temporarymode) | | | `WII5_MODES` | [`temporaryModeExpires`](#temporarymodeexpires) | | | `uint16_t` | [`batteryLow`](#batterylow) | | | `uint16_t` | [`batteryMid`](#batterymid) | | | `uint32_t` | [`sleepUntil`](#sleepuntil) | | --- #### type ```cpp uint8_t type ``` --- #### version ```cpp uint8_t version ``` --- #### disableLowBattery ```cpp time_t disableLowBattery ``` --- #### flags ```cpp uint32_t flags ``` --- #### gpsTimeout ```cpp uint32_t gpsTimeout ``` --- #### capturePeriod ```cpp uint32_t capturePeriod ``` --- #### captureBinaryType ```cpp uint32_t captureBinaryType ``` --- #### captureRecords ```cpp uint32_t captureRecords ``` --- #### positionPeriod ```cpp uint32_t positionPeriod ``` --- #### positionBinaryType ```cpp uint32_t positionBinaryType ``` --- #### sleepPeriod ```cpp uint32_t sleepPeriod ``` --- #### sleepBinaryType ```cpp uint32_t sleepBinaryType ``` --- #### sleepMaths ```cpp uint32_t sleepMaths ``` --- #### defaultMode ```cpp WII5_MODES defaultMode ``` --- #### temporaryMode ```cpp WII5_MODES temporaryMode ``` --- #### temporaryModeExpires ```cpp WII5_MODES temporaryModeExpires ``` --- #### batteryLow ```cpp uint16_t batteryLow ``` --- #### batteryMid ```cpp uint16_t batteryMid ``` --- #### sleepUntil ```cpp uint32_t sleepUntil ``` ## WII5MetaDataObject ```cpp #include ``` ### Public Attributes | Return | Name | Description | |--------|------|-------------| | `uint32_t` | [`deviceId`](#deviceid-1) | | | `uint32_t` | [`recordCount`](#recordcount-4) | | | `time_t` | [`last`](#last-3) | | | `uint32_t` | [`age`](#age-3) | | | `uint32_t` | [`uptime`](#uptime-2) | | | `uint32_t` | [`version`](#version-1) | | | `int32_t` | [`temperatureValue`](#temperaturevalue) | | | `uint32_t` | [`temperatureAge`](#temperatureage) | | | `int32_t` | [`batteryValue`](#batteryvalue) | | | `uint32_t` | [`batteryAge`](#batteryage) | | | `float` | [`gpsLat`](#gpslat) | | | `float` | [`gpsLon`](#gpslon) | | | `float` | [`gpsAlt`](#gpsalt) | | | `int32_t` | [`gpsSat`](#gpssat) | | | `int32_t` | [`gpsHdop`](#gpshdop) | | | `uint32_t` | [`gpsFixTime`](#gpsfixtime) | | | `uint32_t` | [`gpsAge`](#gpsage) | | | `uint32_t` | [`captureWriteMax`](#capturewritemax-2) | | | `uint32_t` | [`captureWriteMin`](#capturewritemin-2) | | | `uint32_t` | [`captureWriteOver`](#capturewriteover-2) | | | `uint32_t` | [`captureTimeError`](#capturetimeerror) | | | `uint32_t` | [`captureSizeError`](#capturesizeerror) | | | `uint32_t` | [`captureStartTime`](#capturestarttime) | | | `uint8_t` | [`mode`](#mode-3) | | | `uint32_t` | [`iridiumFixTime`](#iridiumfixtime) | | | `uint32_t` | [`iridiumSignalQuality`](#iridiumsignalquality) | | --- #### deviceId ```cpp uint32_t deviceId ``` --- #### recordCount ```cpp uint32_t recordCount ``` --- #### last ```cpp time_t last ``` --- #### age ```cpp uint32_t age ``` --- #### uptime ```cpp uint32_t uptime ``` --- #### version ```cpp uint32_t version ``` --- #### temperatureValue ```cpp int32_t temperatureValue ``` --- #### temperatureAge ```cpp uint32_t temperatureAge ``` --- #### batteryValue ```cpp int32_t batteryValue ``` --- #### batteryAge ```cpp uint32_t batteryAge ``` --- #### gpsLat ```cpp float gpsLat ``` --- #### gpsLon ```cpp float gpsLon ``` --- #### gpsAlt ```cpp float gpsAlt ``` --- #### gpsSat ```cpp int32_t gpsSat ``` --- #### gpsHdop ```cpp int32_t gpsHdop ``` --- #### gpsFixTime ```cpp uint32_t gpsFixTime ``` --- #### gpsAge ```cpp uint32_t gpsAge ``` --- #### captureWriteMax ```cpp uint32_t captureWriteMax ``` --- #### captureWriteMin ```cpp uint32_t captureWriteMin ``` --- #### captureWriteOver ```cpp uint32_t captureWriteOver ``` --- #### captureTimeError ```cpp uint32_t captureTimeError ``` --- #### captureSizeError ```cpp uint32_t captureSizeError ``` --- #### captureStartTime ```cpp uint32_t captureStartTime ``` --- #### mode ```cpp uint8_t mode ``` --- #### iridiumFixTime ```cpp uint32_t iridiumFixTime ``` --- #### iridiumSignalQuality ```cpp uint32_t iridiumSignalQuality ``` ## WII5_BINDATA_HEADER ```cpp #include ``` ### Public Attributes | Return | Name | Description | |--------|------|-------------| | `uint16_t` | [`wii_binary_id`](#wii_binary_id) | | | `uint32_t` | [`bindata_type`](#bindata_type) | | | `uint8_t` | [`bindata_packet`](#bindata_packet) | | | `uint32_t` | [`deviceId`](#deviceid-2) | | | `uint32_t` | [`recordCount`](#recordcount-5) | | --- #### wii_binary_id ```cpp uint16_t wii_binary_id ``` --- #### bindata_type ```cpp uint32_t bindata_type ``` --- #### bindata_packet ```cpp uint8_t bindata_packet ``` --- #### deviceId ```cpp uint32_t deviceId ``` --- #### recordCount ```cpp uint32_t recordCount ``` ## WII5_DATA_SpartonBinary ```cpp #include ``` ### Public Attributes | Return | Name | Description | |--------|------|-------------| | `uint8_t` | [`byteCount`](#bytecount) | | | `uint8_t` | [`status`](#status-2) | | | `uint8_t` | [`channel`](#channel) | | | `float` | [`pose_x`](#pose_x) | | | `float` | [`pose_y`](#pose_y) | | | `float` | [`pose_z`](#pose_z) | | | `float` | [`accel_x`](#accel_x) | | | `float` | [`accel_y`](#accel_y) | | | `float` | [`accel_z`](#accel_z) | | | `uint32_t` | [`stamp`](#stamp) | | | `uint16_t` | [`crc`](#crc) | | --- #### byteCount ```cpp uint8_t byteCount ``` --- #### status ```cpp uint8_t status ``` --- #### channel ```cpp uint8_t channel ``` --- #### pose_x ```cpp float pose_x ``` --- #### pose_y ```cpp float pose_y ``` --- #### pose_z ```cpp float pose_z ``` --- #### accel_x ```cpp float accel_x ``` --- #### accel_y ```cpp float accel_y ``` --- #### accel_z ```cpp float accel_z ``` --- #### stamp ```cpp uint32_t stamp ``` --- #### crc ```cpp uint16_t crc ``` Generated by [Moxygen](https://0state.com/moxygen)