Commit Graph
22625 Commits
Author SHA1 Message Date
Philippe Teuwen ff6954f8a6 First attempt at providing guidance to LLMs, don't hesitate to try it out 2026-08-28 15:17:11 +02:00
MsprgandClaude Fable 5 d852118de5 client: build the tab completion vocabulary at runtime from the command tree
Tab completion used a generated table (pm3line_vocabulary.h, refreshed by
hand via `make commands`) that drifted from the real command tables: new
commands were missing (e.g. `hw bwm*`), removed ones lingered, and the
"offline" flag depended on the platform of whoever regenerated it
(IfPm5() returns true offline on PM5 builds).

Build the vocabulary at startup instead:

- cmdparser: add walkCommandsRecursive(), a tree walk using a fourth
  internal sentinel (XX_internal_command_walk_XX) next to the dump ones.
  It hands each leaf to a visitor as its command_t chain (ancestors +
  leaf). A dispatch counter detects entries shown like a category but
  with their own parser (reveng) and reports them as leaves.
- pm3line_vocabulary: dynamic vocabulary holding the IsAvailable()
  predicates of every command and its ancestor categories, so completion
  applies exactly the rule CmdsHelp() uses, live, for both offline and
  connected devices. Script entries ("script run <relpath>") come from
  the same directories `script list` scans, sorted, including
  subdirectories with the path `script run` needs.
- pm3line: readline and linenoise completers consume the live vocabulary.
  The walk runs with output disabled so category handlers stay silent.
- Drop pm3_help2list.py and the header regeneration from `make commands`.

Behaviour change: entries whose category is hidden by `help` (e.g. `mem`,
`usart` offline) are no longer offered, matching `help`; when connected,
commands the device does not support are no longer offered either.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-28 14:29:04 +02:00
Shaw InnesandClaude Opus 5 b6e9d48a35 Fix standalone mode button trigger on non-PM5 platforms
The 1-second button hold that launches a standalone mode has been a
no-op on every platform except PM5 since e3511c535 ("Used HAL layer").

That commit repurposed the long press as a power-off gesture for PM5,
but commented out the RunMod() call unconditionally while guarding only
the new power-off code with #ifdef PM5. On PM3 builds the BUTTON_HOLD
branch therefore compiles down to an empty block, leaving CMD_STANDALONE
(the client's `hw standalone` command) as the only remaining entry point
to a standalone mode -- which defeats their purpose, since standalone
modes exist to run without a host attached.

Restore the call under #ifndef PM5 and move the PM5 power-off code to
the #else branch, matching the guard style used elsewhere in the same
commit.

Verified: PM3RDV4 and PM3GENERIC images now have two RunMod call sites
(AppMain + CMD_STANDALONE); PM5 still has one and retains its power-off
path.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-28 14:16:02 +02:00
Niel Nielsen bd52734774 Modify PLATFORM_EXTRAS comments in Makefile
Updated commented PLATFORM_EXTRAS options for clarity.

Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-08-28 14:14:29 +02:00
Niel Nielsen 755fdc7c7a Implement low-battery shutdown and update comments
Added support for low-battery shutdown features and updated comments for clarity.

Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-08-28 14:14:29 +02:00
Niel Nielsen d35ddce206 Update low-battery options in Makefile.hal
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-08-28 14:14:29 +02:00
Niel Nielsen 98abc5d5f7 Clarify low-battery options in Makefile.hal
Updated comments for clarity on low-battery options.

Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-08-28 14:14:29 +02:00
Niel Nielsen b7b20ef698 Update Makefile with PLATFORM_EXTRAS comments
Added comments for PLATFORM_EXTRAS options in Makefile.

Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-08-28 14:14:29 +02:00
Philippe Teuwen a6b4107066 Add --on to hw bwmcharge, same syntax as hw bwmautooff 2026-08-28 13:17:05 +02:00
Niel Nielsen c2aec48b49 Add files via upload
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-08-28 13:10:24 +02:00
Niel Nielsen 4cf2e83c3a Add support for BWM charger, buzzer, and RGB indicator
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-08-28 13:10:24 +02:00
Niel Nielsen 2535307642 Add BWM charger and PM5 RGB indicator support
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-08-28 13:10:24 +02:00
Niel Nielsen 4ec53ea2e6 Add newline at end of appmain.c
Fix missing newline at end of file

Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-08-28 13:10:24 +02:00
Niel Nielsen 767f7b2531 Refactor battery management functions and integrate buzzer
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-08-28 13:10:24 +02:00
Niel Nielsen e9688db826 Refactor BWM_WIFI command handling logic
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-08-28 13:10:24 +02:00
Niel Nielsen b3fc31f58f Fix header file formatting and add missing defines
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-08-28 13:10:24 +02:00
Niel Nielsen 33535330e1 Enhance WiFi command with stop option and error messages
Updated command handling for WiFi configuration to include a stop option and adjusted error messages accordingly.

Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-08-28 13:10:24 +02:00
Niel Nielsen fd2cfbd194 Define DHCP wait and poll times in bwm_wifi.h
Added definitions for DHCP wait and poll times.

Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-08-28 13:10:24 +02:00
Niel Nielsen 26cb7495a6 Adjust DHCP wait time and improve IP handling
Increase DHCP wait time to accommodate slower hotspots and improve IP acquisition reliability.

Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-08-28 13:10:24 +02:00
Philippe Teuwen f08792fef0 Add -n to hf 14a reader 2026-08-28 10:29:26 +02:00
Iceman 9a2ba4f5d6 Merge pull request #3542 from Antiklesys/master
Fixing bugs from 76181dfb8 and 377d7cd61
2026-08-28 13:07:14 +07:00
Antiklesys f5dc8ab42f FIxing bugs from 76181dfb8 and 377d7cd61
FIxing bugs from 76181dfb8 and 377d7cd61 breaking secure channel operations
2026-08-28 13:43:11 +08:00
iceman1001 77a9f45db6 texts 2026-08-28 01:16:30 +02:00
iceman1001 377d7cd612 since it still felt a bit slow, Claude came up with the idea of burst mode transfers. A new sim module firmware 'sim022.bin' and we now can auto-negotiate for TA1 = 0x95 which give us 125 000 bits/s which is almost 10x from the 10752 bits/s we were doing before. Thanks Claude! 2026-08-28 01:16:11 +02:00
Iceman 9c962ed537 Merge pull request #3541 from Msprg/fix-install-simfw
Fix make install after sim014 firmware removal
2026-08-28 05:23:53 +07:00