New design Dual Watch

This commit is contained in:
Armel FAUVEAU
2024-02-17 19:05:06 +01:00
parent 682b99968a
commit 308affa672
7 changed files with 26 additions and 20 deletions

View File

@@ -298,6 +298,7 @@ void SETTINGS_InitEEPROM(void)
gSetting_set_inv = (((tmp >> 0) & 0x01) < 2) ? ((tmp >> 0) & 0x01): 0;
gSetting_set_lck = (((tmp >> 1) & 0x01) < 2) ? ((tmp >> 1) & 0x01): 0;
gSetting_set_met = (((tmp >> 2) & 0x01) < 2) ? ((tmp >> 2) & 0x01): 0;
gSetting_set_gui = (((tmp >> 3) & 0x01) < 2) ? ((tmp >> 3) & 0x01): 0;
gSetting_set_ctr = (((Data[5] & 0x0F)) < 16) ? ((Data[5] & 0x0F)) : 5;
// And set special session settings for actions
@@ -630,19 +631,14 @@ void SETTINGS_SaveSettings(void)
int tmp = 0;
/*
if (c == 1)
tmp = tmp | (1 << 0);
if (d == 1)
tmp = tmp
*/
if(gSetting_set_inv == 1)
tmp = tmp | (1 << 0);
if (gSetting_set_lck == 1)
tmp = tmp | (1 << 1);
if (gSetting_set_met == 1)
tmp = tmp | (2 << 1);
tmp = tmp | (1 << 2);
if (gSetting_set_gui == 1)
tmp = tmp | (1 << 3);
State[5] = ((tmp << 4) | (gSetting_set_ctr & 0x0F));
State[6] = ((gSetting_set_tot << 4) | (gSetting_set_eot & 0x0F));