The ultimate harness for coding agents and beyond. All your agents. All your machines. One command center. Start with code, then follow your curiosity and build across disciplines: CAD, circuits, robots, games and music.
TypeScript 3d-modelingagent-frameworkagent-harnessai-agentscadclaude-codecodexcoding-agentsdeveloper-toolsesp32game-developmentmcp-servermulti-agentopen-hardwareopencodeopenharnesspcbroboticsterminaltmux
feat(device): a dial nobody has set up opens on Focus, at full brightness
0xdiego2537a0b8fc6c1c
diff --git a/devices/harness-device/firmware/main/CMakeLists.txt b/devices/harness-device/firmware/main/CMakeLists.txtindex d8ea035a9..c388db96b 100644--- a/devices/harness-device/firmware/main/CMakeLists.txt+++ b/devices/harness-device/firmware/main/CMakeLists.txt@@ -107,11 +107,12 @@ if(DEVICE_HABITAT_ORANGE)target_compile_definitions(${COMPONENT_LIB} PRIVATE DEVICE_HABITAT_ORANGE=1)endif()+# Focus unless told otherwise — see ht_character_default().if(DEVICE_DEFAULT_CHARACTER STREQUAL "tux")target_compile_definitions(${COMPONENT_LIB} PRIVATE DEVICE_DEFAULT_CHARACTER_TUX=1)-elseif(DEVICE_DEFAULT_CHARACTER STREQUAL "focus")- target_compile_definitions(${COMPONENT_LIB} PRIVATE DEVICE_DEFAULT_CHARACTER_FOCUS=1)-elseif(DEFINED DEVICE_DEFAULT_CHARACTER AND NOT DEVICE_DEFAULT_CHARACTER STREQUAL "tim")+elseif(DEVICE_DEFAULT_CHARACTER STREQUAL "tim")+ target_compile_definitions(${COMPONENT_LIB} PRIVATE DEVICE_DEFAULT_CHARACTER_TIM=1)+elseif(DEFINED DEVICE_DEFAULT_CHARACTER AND NOT DEVICE_DEFAULT_CHARACTER STREQUAL "focus")message(FATAL_ERROR "DEVICE_DEFAULT_CHARACTER must be tim, tux or focus")endif()diff --git a/devices/harness-device/firmware/main/config_store.c b/devices/harness-device/firmware/main/config_store.cindex eecdb06a1..16b34cd85 100644--- a/devices/harness-device/firmware/main/config_store.c+++ b/devices/harness-device/firmware/main/config_store.c@@ -52,7 +52,7 @@ void config_save_voicelang(const char *lang)uint8_t config_load_brightness(void){nvs_handle_t h;- uint8_t v = 102; // default 40%+ uint8_t v = 255; // default 100%: a dial nobody has dimmed is at full (owner, 2026-09-30)if (nvs_open(NS, NVS_READONLY, &h) == ESP_OK) {nvs_get_u8(h, "bright", &v); // leaves v at default if key is absentnvs_close(h);diff --git a/devices/harness-device/firmware/main/ui/habitat/character.c b/devices/harness-device/firmware/main/ui/habitat/character.cindex b40ce6a08..6d2b5a6a9 100644--- a/devices/harness-device/firmware/main/ui/habitat/character.c+++ b/devices/harness-device/firmware/main/ui/habitat/character.c@@ -72,14 +72,18 @@ static const character_definition_t *definition(ht_character_id_t id){return &characters[(unsigned)id < HT_CHARACTER_COUNT ? id : HT_CHARACTER_TIM];}+// What a dial shows before anybody has chosen: Focus. The owner's decision (2026-09-30), and the+// reason a freshly flashed dial — or one coming from a firmware that never saved `habitat_char` —+// opens on the work rather than on the octopus. A choice made since is kept; this is only the+// fallback for none. Tim or Tux as the default is a build flag (DEVICE_DEFAULT_CHARACTER).ht_character_id_t ht_character_default(void){-#if defined(DEVICE_DEFAULT_CHARACTER_FOCUS)- return HT_CHARACTER_FOCUS;+#if defined(DEVICE_DEFAULT_CHARACTER_TIM)+ return HT_CHARACTER_TIM;#elif defined(DEVICE_DEFAULT_CHARACTER_TUX)return HT_CHARACTER_TUX;#else- return HT_CHARACTER_TIM;+ return HT_CHARACTER_FOCUS;#endif}const char *ht_character_name(ht_character_id_t id) { return definition(id)->name; }diff --git a/devices/harness-device/firmware/test/test_character_preferences.py b/devices/harness-device/firmware/test/test_character_preferences.pyindex b14667eeb..ce80aa045 100644--- a/devices/harness-device/firmware/test/test_character_preferences.py+++ b/devices/harness-device/firmware/test/test_character_preferences.py@@ -42,8 +42,14 @@ static int nvs_open(const char *ns, int mode, nvs_handle_t *h) {if (fail_open) return -1;opens++; *h = 123; writable = mode == NVS_READWRITE; staged = stored; return ESP_OK;}+static bool bright_present; static uint8_t bright_stored;static int nvs_get_u8(nvs_handle_t h, const char *key, uint8_t *value) {- assert(h == 123 && !strcmp(key, "habitat_char"));+ assert(h == 123);+ if (!strcmp(key, "bright")) {+ if (!bright_present) return -1;+ *value = bright_stored; return ESP_OK;+ }+ assert(!strcmp(key, "habitat_char"));if (!present || fail_get) return -1;*value = stored; return ESP_OK;}@@ -65,6 +71,7 @@ static void ui_cable_toast(const char *message) {assert(!strcmp(message, "Character changed; saving failed.")); errors++;}'''+code += function('config_load_brightness', config) + '\n'code += function('config_load_habitat_character', config) + '\n'code += function('config_save_habitat_character', config) + '\n'code += 'static void boot(void) {\n' + load + '}\n'@@ -77,8 +84,13 @@ int main(void) {#ifdef DEVICE_DEFAULT_CHARACTER_TUXassert(ht_character_default() == HT_CHARACTER_TUX);#else- assert(ht_character_default() == HT_CHARACTER_TIM);+ // Focus is what a dial shows before anybody has chosen (owner's decision, 2026-09-30).+ assert(ht_character_default() == HT_CHARACTER_FOCUS);#endif+ // And at full brightness: no "bright" key is 255, a saved one is kept exactly.+ bright_present = false; assert(config_load_brightness() == 255);+ bright_present = true; bright_stored = 102; assert(config_load_brightness() == 102);+ bright_present = false;home_caption.initialized=true;boot(); assert(character.id == ht_character_default() && !home_caption.initialized);assert(!writes && !commits); // Boot cannot overwrite a previous preference.