v1.15.3 - Add GET_USAGE command (2025-12-12)¶
What Changed?¶
This release adds the GET_USAGE command which provides a simple, machine-readable list of all available commands with their descriptions. This makes it easy for clients to discover and document the complete command interface without needing to parse complex help text.
What's New¶
Main Feature: GET_USAGE Command¶
What it does: Returns a JSON array containing all available commands with their descriptions. Each entry includes the command name and a brief description of what it does. This provides a complete, machine-readable inventory of the device's command interface.
How to use it:
Send the GET_USAGE command to the device via serial:
GET_USAGE
The device responds with a JSON object containing a commands array.
Response example:
{
"type": "response",
"status": "ok",
"sent_at": 1234567890,
"commands": [
{
"command": "GET_VERSION",
"description": "Firmware version"
},
{
"command": "GET_BUILD_TYPE",
"description": "Build type/environment"
},
{
"command": "GET_STATUS",
"description": "Display system status"
},
{
"command": "GET_MAC_ADDRESS",
"description": "MAC address"
},
{
"command": "GET_BME280",
"description": "All BME280 sensor data"
},
{
"command": "GET_BME280_TMP",
"description": "BME280 temperature"
},
{
"command": "GET_BME280_ATM",
"description": "BME280 pressure"
},
{
"command": "GET_BME280_HMD",
"description": "BME280 humidity"
},
{
"command": "SET_POLL_COUNT",
"description": "Set poll count"
},
{
"command": "GET_POLL_COUNT",
"description": "Get poll count"
},
{
"command": "SET_THRESHOLD",
"description": "Set DAC threshold"
},
{
"command": "GET_THRESHOLD",
"description": "Get DAC threshold"
},
{
"command": "SET_DEADTIME",
"description": "Set detector deadtime"
},
{
"command": "GET_DEADTIME",
"description": "Get detector deadtime"
},
{
"command": "TEST_LED",
"description": "Test LED control"
},
{
"command": "GET_UPTIME",
"description": "System uptime"
},
{
"command": "GET_TIME",
"description": "Get RTC/GNSS time and difference"
},
{
"command": "GET_HELP",
"description": "Command reference"
},
{
"command": "GET_USAGE",
"description": "List all available commands"
},
{
"command": "SET_STREAM",
"description": "Enable/disable detection output"
},
{
"command": "GET_STREAM",
"description": "Query stream status"
},
{
"command": "RESET",
"description": "Factory reset"
},
{
"command": "SET_RTC_TIME",
"description": "Set device time"
},
{
"command": "GET_RTC_TIME",
"description": "Get device time"
},
{
"command": "GET_GNSS",
"description": "Get all GNSS data including state"
},
{
"command": "GET_GNSS_LATITUDE",
"description": "Get GNSS latitude"
},
{
"command": "GET_GNSS_LONGITUDE",
"description": "Get GNSS longitude"
},
{
"command": "GET_GNSS_ALTITUDE",
"description": "Get GNSS altitude"
},
{
"command": "GET_GNSS_POSITION",
"description": "Get GNSS position data"
},
{
"command": "GET_GNSS_TIME",
"description": "Get GNSS unix timestamp"
},
{
"command": "GET_GNSS_TIME_MS",
"description": "Get GNSS timestamp in milliseconds"
},
{
"command": "GET_GNSS_TIME_US",
"description": "Get GNSS timestamp in microseconds"
},
{
"command": "GET_GNSS_CS",
"description": "Get GNSS centisecond"
},
{
"command": "GET_GNSS_SATELLITES",
"description": "Get satellite count"
},
{
"command": "GET_GNSS_QUALITY",
"description": "Get fix quality"
},
{
"command": "GET_GNSS_VALID",
"description": "Get fix validity"
},
{
"command": "GET_GNSS_HDOP",
"description": "Get HDOP"
},
{
"command": "GET_GNSS_STATE",
"description": "Get GNSS module state"
},
{
"command": "SET_WIFI_SSID",
"description": "Connect to WiFi"
},
{
"command": "SET_WIFI_ENABLE",
"description": "Enable/disable WiFi"
},
{
"command": "GET_WIFI",
"description": "WiFi status"
}
]
}
Installation¶
Quick Start¶
# Get the release
git checkout v1.15.3
# Build
task build
# Upload
task upload
# Check it works
task monitor
What's Different from the Last Version?¶
✅ Added¶
- GET_USAGE command - Returns machine-readable list of all available commands with descriptions
🔧 Changed¶
- Command dispatcher now includes GET_USAGE entry in the dispatch table
🐛 Fixed¶
- None in this release
Is It Safe to Upgrade?¶
Backward Compatible: Yes
- No changes to existing commands or behavior
- GET_USAGE is a new read-only command with no side effects
- All existing client code continues to work unchanged
Tests Passed¶
- ✅ Builds without errors
- ✅ New command handler compiles correctly
- ✅ Dispatch table properly configured
- ✅ Command metadata correctly populated from dispatch table
Release Details¶
- Date: 2025-12-12
- Version: v1.15.3
- Files Changed: 2 (src/command/usage.cpp, src/command_manager.cpp)
Next Steps¶
Future enhancements could include:
- Auto-generating documentation from GET_USAGE response
- Adding command filtering (e.g., GET_USAGE --category system)