Skip to content

Commit

Permalink
Timer start condition fixed.
Browse files Browse the repository at this point in the history
  • Loading branch information
qba667 committed Jan 10, 2018
1 parent b38dd05 commit 11fc14a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
4 changes: 4 additions & 0 deletions source/MKL16Z64xxx4_flash.ld
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ SECTIONS
*(.mod_lastTimerUpdate);
*(.mod_altSensorMemory);
*(.mod_varioMem);
*(.mod_maxSNR);
*(.mod_altSensorMemory);
KEEP(*(.AUX_MEM))
} > m_data
Expand Down Expand Up @@ -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);
Expand All @@ -289,6 +292,7 @@ SECTIONS
.mod_595C 0x595C : {
*(.mod_voltADJConfig);
*(.mod_voltSensors);
*(.mod_mapSNR);
}
.reserved_after_code_595C 0x5B28 : {
*(.reserved_after_code_595C);
Expand Down
13 changes: 10 additions & 3 deletions source/source/alt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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';
Expand All @@ -152,6 +157,8 @@ void mixConfig() {
}
displayGFX((gfxInfo*)GFX_ARROW, mixPos[col], row << 3);
}


LCD_updateCALL();
key = getKeyCode();
index = 3 * row + col;
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 11fc14a

Please sign in to comment.