mirror of
https://github.com/opentx/opentx.git
synced 2025-07-13 11:29:51 +03:00
X9D+ 2019 Bootloader: wait needed before detecting trims are pressed
as done on Horus...
This commit is contained in:
parent
adbe72d76f
commit
a27417c497
3 changed files with 7 additions and 4 deletions
|
@ -69,13 +69,13 @@ FlashCheckRes valid;
|
|||
MemoryType memoryType;
|
||||
uint32_t unlocked = 0;
|
||||
|
||||
void interrupt10ms(void)
|
||||
void interrupt10ms()
|
||||
{
|
||||
tenms |= 1; // 10 mS has passed
|
||||
tenms |= 1u; // 10 mS has passed
|
||||
|
||||
uint8_t index = 0;
|
||||
uint8_t in = readKeys();
|
||||
for (uint8_t i = 1; i != uint8_t(1 << TRM_BASE); i <<= 1) {
|
||||
for (uint8_t i = 1; i != uint8_t(1u << TRM_BASE); i <<= 1) {
|
||||
uint8_t value = (in & i);
|
||||
keys[index].input(value);
|
||||
++index;
|
||||
|
@ -210,7 +210,7 @@ int main()
|
|||
pwrInit();
|
||||
keysInit();
|
||||
|
||||
#if defined(PCBHORUS)
|
||||
#if defined(BOOTLOADER_WAIT_BEFORE_READ_TRIMS)
|
||||
// wait a bit for the inputs to stabilize...
|
||||
if (!WAS_RESET_BY_WATCHDOG_OR_SOFTWARE()) {
|
||||
for (uint32_t i = 0; i < 150000; i++) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue