From 11fc14a6cf1530cfb351532ae30d069058fa652a Mon Sep 17 00:00:00 2001 From: qba667 Date: Wed, 10 Jan 2018 12:36:22 +0100 Subject: [PATCH] Timer start condition fixed. --- source/MKL16Z64xxx4_flash.ld | 4 ++++ source/source/alt.c | 13 ++++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/source/MKL16Z64xxx4_flash.ld b/source/MKL16Z64xxx4_flash.ld index 21584b9..6e94e12 100644 --- a/source/MKL16Z64xxx4_flash.ld +++ b/source/MKL16Z64xxx4_flash.ld @@ -125,6 +125,7 @@ SECTIONS *(.mod_lastTimerUpdate); *(.mod_altSensorMemory); *(.mod_varioMem); + *(.mod_maxSNR); *(.mod_altSensorMemory); KEEP(*(.AUX_MEM)) } > m_data @@ -281,6 +282,8 @@ SECTIONS .mod_code_5174_5353 0x5174 : { *(.mod_varioSensorSelect); *(.mod_configurePins); + *(.mod_SNR); + } .reserved_after_code_5174_5353 0x5354 : { *(.reserved_after_code_5174_5353); @@ -289,6 +292,7 @@ SECTIONS .mod_595C 0x595C : { *(.mod_voltADJConfig); *(.mod_voltSensors); + *(.mod_mapSNR); } .reserved_after_code_595C 0x5B28 : { *(.reserved_after_code_595C); diff --git a/source/source/alt.c b/source/source/alt.c index 5c432ce..c919be9 100644 --- a/source/source/alt.c +++ b/source/source/alt.c @@ -119,7 +119,7 @@ void mixConfig() { uint8_t row = 0; uint8_t col = 0; uint8_t rowPos = 0; - uint8_t channel = 0; + int8_t config[MIX_CONFIG_SIZE_BYTES]; uint8_t index = 0; int8_t value = 0; @@ -128,10 +128,15 @@ void mixConfig() { char buffer[16]; char *bufferPtr; + + uint8_t channel = 0; + do { callSetupDMAandSend(); - //displayPageHeader((char*)0xDBEC); + displayPageHeader((char*)0xDBCB); channel = 7; + + for (uint8_t rowIndex= 0; rowIndex < MAX_ROWS; rowIndex++, channel++) { rowPos = rowIndex << 3; /*buffer[0] = channel < 10 ? ' ' : '1'; @@ -152,6 +157,8 @@ void mixConfig() { } displayGFX((gfxInfo*)GFX_ARROW, mixPos[col], row << 3); } + + LCD_updateCALL(); key = getKeyCode(); index = 3 * row + col; @@ -277,7 +284,7 @@ uint32_t isTimerActive(){ //if(value > one_thousand*2) return 0; // > 2000 int32_t chValue = *(((int32_t *)CHANNEL_VALUE)+(channel-1)); int32_t configVal = ((int32_t)configPtr->timerStart - one_thousand) * 20 - ten_thousands; - if(channel == 0 || configVal <= 0) return 0; + if(channel == 0) return 0; return chValue > configVal; }