From f30caa36f46b85b5bea8a9bc328f3079ed3b85d5 Mon Sep 17 00:00:00 2001 From: SiteRelEnby <125829806+SiteRelEnby@users.noreply.github.com> Date: Wed, 11 Sep 2024 13:21:05 -0500 Subject: [PATCH] Create a d3aa firmware variant with jumpstart, and fix a bug where channel mode config could be accessed from off if globals config was not enabled --- MODELS | 1 + hw/hank/emisar-d3aa/jumpstart/anduril.h | 9 +++++++++ hw/hank/emisar-d3aa/jumpstart/model | 1 + ui/anduril/channel-modes.c | 2 +- 4 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 hw/hank/emisar-d3aa/jumpstart/anduril.h create mode 100644 hw/hank/emisar-d3aa/jumpstart/model diff --git a/MODELS b/MODELS index caa4bf5d..27052314 100644 --- a/MODELS +++ b/MODELS @@ -24,6 +24,7 @@ Model MCU Name 0143 attiny1634 hank-noctigon-m44 0151 attiny1634 hank-emisar-d4k-3ch 0161 avr32dd20 hank-emisar-d3aa +0162 avr32dd20 hank-emisar-d3aa-jumpstart 0211 attiny1634 hank-noctigon-kr4 0212 attiny1634 hank-noctigon-kr4-nofet 0213 attiny1634 hank-noctigon-kr4-219 diff --git a/hw/hank/emisar-d3aa/jumpstart/anduril.h b/hw/hank/emisar-d3aa/jumpstart/anduril.h new file mode 100644 index 00000000..6ef0d4ac --- /dev/null +++ b/hw/hank/emisar-d3aa/jumpstart/anduril.h @@ -0,0 +1,9 @@ +// Emisar D3AA config options for Anduril +// Copyright (C) 2023 thefreeman, Selene ToyKeeper +// SPDX-License-Identifier: GPL-3.0-or-later +#pragma once + +#include "hank/emisar-d3aa/anduril.h" + +#define USE_JUMP_START +#define DEFAULT_JUMP_START_LEVEL 10 diff --git a/hw/hank/emisar-d3aa/jumpstart/model b/hw/hank/emisar-d3aa/jumpstart/model new file mode 100644 index 00000000..cdc9591b --- /dev/null +++ b/hw/hank/emisar-d3aa/jumpstart/model @@ -0,0 +1 @@ +0162 diff --git a/ui/anduril/channel-modes.c b/ui/anduril/channel-modes.c index 1551ad53..630773f8 100644 --- a/ui/anduril/channel-modes.c +++ b/ui/anduril/channel-modes.c @@ -135,7 +135,7 @@ uint8_t channel_mode_state(Event event, uint16_t arg) { #if NUM_CHANNEL_MODES > 1 // channel toggle menu on ... 9H? - else if (event == EV_click9_hold) { + else if ((event == EV_click9_hold) && (current_state == steady_state)) { push_state(channel_mode_config_state, 0); return EVENT_HANDLED; }