Skip to content

v1.11.5 - Binary DAC Threshold Format Support for Text Command Mode (2025-12-08)

What Changed?

This release adds fallback support for binary DAC threshold format (<ch> <byte1> <byte2>) within text command mode. Users can now replay binary protocol commands directly in text command mode without switching protocols, improving flexibility for debugging and data replay scenarios. The feature is fully backward compatible with existing text and binary commands.


What's New

Main Feature: Binary DAC Threshold Format Fallback in Text Mode

What it does: Allows binary protocol DAC threshold commands to be executed directly in text command mode. When a command line consists of three numeric tokens (channel 1-3 and two hex byte values), the firmware automatically detects it as binary format, decodes the protocol bytes to threshold values, and applies the configuration. This eliminates the need to switch between text and binary protocols for threshold adjustments.

How to use it:

Send a command in the format <ch> <byte1> <byte2> where:

  • <ch> is the channel (1, 2, or 3)
  • <byte1> and <byte2> are DAC protocol bytes in hex or decimal

Example usage:

1 0x13 0x4A
2 19 74
3 0x10 0x00

Response:

{"type":"response","status":"ok","channel":1,"threshold":300,"mode":"binary"}

Installation

Quick Start

# Get the release
git checkout vX.Y.Z

# Build
task build

# Upload
task upload

# Check it works
task monitor

What's Different from the Last Version?

✅ Added

  • Binary DAC threshold format support in text command mode (<ch> <byte1> <byte2>)
  • dac_decode_threshold() function to decode protocol bytes to threshold values
  • handle_set_dac() external handler for binary format processing
  • Binary format auto-detection in text_dispatch() (channel 1-3 with 2 args)

🔧 Changed

  • text_dispatch() now detects and processes binary format before command table lookup
  • No changes to existing text or binary protocol behavior

Is It Safe to Upgrade?

Backward Compatible: Yes

  • No breaking changes to existing text commands (SET_THRESHOLD, GET_THRESHOLD, etc.)
  • Binary protocol completely unchanged
  • New feature only activates when command line starts with "1", "2", or "3" followed by 2 hex arguments
  • Existing single-digit commands unaffected (binary protocol still uses separate serial interface)

Tests Passed

  • ✅ Builds without errors (esp32dev-dev profile)
  • ✅ RAM usage: 8.8% (28764 bytes / 327680 bytes)
  • ✅ Flash usage: 26.6% (348301 bytes / 1310720 bytes)
  • ✅ Binary format auto-detection works for channels 1-3
  • ✅ Hex and decimal byte parsing verified
  • ✅ Threshold decoding verified
  • ✅ DAC hardware send confirmed

Release Details

  • Date: 2025-12-08
  • Version: v1.11.5
  • Files Changed: 4 (dac_manager.h, dac_manager.cpp, text_command.cpp, text_command_manager.cpp)
  • Commits: 2 (dac_decode_threshold + binary format support)

Next Steps

  • Consider adding similar binary format fallback support for other protocol types (if needed)
  • Monitor user feedback on binary format parsing accuracy
  • Plan for potential unified command interface redesign in future major releases