mirror of
https://github.com/dimoniche/solarium.vlad.git
synced 2026-01-29 20:43:31 +03:00
Счетчики очищаются
This commit is contained in:
parent
ad89ab9780
commit
ad91ee31fe
@ -88,10 +88,12 @@ void app_1ms_callback(void)
|
||||
}
|
||||
}
|
||||
|
||||
SolarCounters counters;
|
||||
|
||||
///
|
||||
void IncSolarCounters(CPU_INT08U ch, CPU_INT08U mode, CPU_INT32U worktime, CPU_INT32U money, CPU_INT08U card)
|
||||
{
|
||||
SolarCounters counters;
|
||||
//SolarCounters counters;
|
||||
ReadArrayFram(offsetof(TFramMap, solar_counters), sizeof(SolarCounters), (unsigned char*)&counters);
|
||||
|
||||
counters.solar_chm[ch * SOLAR_MODES_COUNT + mode].money += money;
|
||||
@ -131,7 +133,7 @@ void IncSolarCounters(CPU_INT08U ch, CPU_INT08U mode, CPU_INT32U worktime, CPU_I
|
||||
///
|
||||
void IncSolarTestCounters(CPU_INT08U ch, CPU_INT08U mode, CPU_INT32U worktime)
|
||||
{
|
||||
SolarCounters counters;
|
||||
//SolarCounters counters;
|
||||
ReadArrayFram(offsetof(TFramMap, solar_counters), sizeof(SolarCounters), (unsigned char*)&counters);
|
||||
|
||||
if (worktime > 0)
|
||||
@ -166,7 +168,7 @@ void IncSolarTestCounters(CPU_INT08U ch, CPU_INT08U mode, CPU_INT32U worktime)
|
||||
///
|
||||
void IncSolarCleaningCounters(CPU_INT08U ch, CPU_INT32U cleaning_time)
|
||||
{
|
||||
SolarCounters counters;
|
||||
//SolarCounters counters;
|
||||
ReadArrayFram(offsetof(TFramMap, solar_counters), sizeof(SolarCounters), (unsigned char*)&counters);
|
||||
if (cleaning_time > 0)
|
||||
{
|
||||
@ -184,7 +186,7 @@ void IncSolarCleaningCounters(CPU_INT08U ch, CPU_INT32U cleaning_time)
|
||||
///
|
||||
void CheckSolarCounters(void)
|
||||
{
|
||||
SolarCounters counters;
|
||||
//SolarCounters counters;
|
||||
ReadArrayFram(offsetof(TFramMap, solar_counters), sizeof(SolarCounters), (unsigned char*)&counters);
|
||||
if (crc16((unsigned char*)&counters, offsetof(SolarCounters, checksum)) != counters.checksum)
|
||||
{
|
||||
@ -197,14 +199,14 @@ void CheckSolarCounters(void)
|
||||
///
|
||||
void SolarClearAllCounters(void)
|
||||
{
|
||||
SolarCounters counters;
|
||||
//SolarCounters counters;
|
||||
ReadArrayFram(offsetof(TFramMap, solar_counters), sizeof(SolarCounters), (unsigned char*)&counters);
|
||||
/// ñ÷åò÷èêè ïî ñîëÿðèÿì è ðåæèìàì
|
||||
memset(&counters.solar_chm, 0, sizeof(SolarCountersRecord) * CHANNELS_NUM * SOLAR_MODES_COUNT);
|
||||
memset(&counters.solar_chm_test, 0, sizeof(SolarCountersRecord) * CHANNELS_NUM * SOLAR_MODES_COUNT);
|
||||
memset(&counters.solar_chm[0], 0, sizeof(SolarCountersRecord) * CHANNELS_NUM * SOLAR_MODES_COUNT);
|
||||
memset(&counters.solar_chm_test[0], 0, sizeof(SolarCountersRecord) * CHANNELS_NUM * SOLAR_MODES_COUNT);
|
||||
/// ñ÷åò÷èêè ïî ðåæèìàì
|
||||
memset(&counters.solar_m, 0, sizeof(SolarCountersRecord) * SOLAR_MODES_COUNT);
|
||||
memset(&counters.solar_m_test, 0, sizeof(SolarCountersRecord) * SOLAR_MODES_COUNT);
|
||||
memset(&counters.solar_m[0], 0, sizeof(SolarCountersRecord) * SOLAR_MODES_COUNT);
|
||||
memset(&counters.solar_m_test[0], 0, sizeof(SolarCountersRecord) * SOLAR_MODES_COUNT);
|
||||
// îòðàáîòàííîå âðåìÿ êîëëàòåí+ìàêñè ïî ñîëÿðèÿì
|
||||
//CPU_INT32U collaten_time[CHANNELS_NUM];
|
||||
// îòðàáîòàííîå âðåìÿ óëüòðàôèîëåò+ìàêñè ïî ñîëÿðèÿì
|
||||
@ -213,8 +215,8 @@ void SolarClearAllCounters(void)
|
||||
counters.cash_money = 0;
|
||||
counters.card_money = 0;
|
||||
counters.bill_count = 0;
|
||||
memset(&counters.cleaning_count, 0, sizeof(CPU_INT32U) * CHANNELS_NUM);
|
||||
memset(&counters.cleaning_time, 0, sizeof(CPU_INT32U) * CHANNELS_NUM);
|
||||
memset(&counters.cleaning_count[0], 0, sizeof(CPU_INT32U) * CHANNELS_NUM);
|
||||
memset(&counters.cleaning_time[0], 0, sizeof(CPU_INT32U) * CHANNELS_NUM);
|
||||
counters.checksum = crc16((unsigned char*)&counters, offsetof(SolarCounters, checksum));
|
||||
WriteArrayFram(offsetof(TFramMap, solar_counters), sizeof(SolarCounters), (unsigned char*)&counters);
|
||||
}
|
||||
@ -222,7 +224,7 @@ void SolarClearAllCounters(void)
|
||||
///
|
||||
void SolarClearLampsCounters(CPU_INT08U ch)
|
||||
{
|
||||
SolarCounters counters;
|
||||
//SolarCounters counters;
|
||||
ReadArrayFram(offsetof(TFramMap, solar_counters), sizeof(SolarCounters), (unsigned char*)&counters);
|
||||
counters.collaten_time[ch] = 0;
|
||||
counters.uf_time[ch] = 0;
|
||||
|
||||
@ -263,7 +263,7 @@
|
||||
<item>app_state.user_menu</item>
|
||||
<item>str</item>
|
||||
<item>str1</item>
|
||||
<item></item>
|
||||
<item />
|
||||
</expressions>
|
||||
<col-names>
|
||||
<item>Expression</item>
|
||||
|
||||
@ -50,7 +50,7 @@
|
||||
<MemConfigValue>C:\Program Files\IAR Systems\Embedded Workbench 9.0\arm\CONFIG\debugger\NXP\LPC2368.ddf</MemConfigValue>
|
||||
</PlDriver>
|
||||
<DebugChecksum>
|
||||
<Checksum>2053374073</Checksum>
|
||||
<Checksum>2524785449</Checksum>
|
||||
</DebugChecksum>
|
||||
<Exceptions>
|
||||
<StopOnUncaught>_ 0</StopOnUncaught>
|
||||
@ -67,10 +67,10 @@
|
||||
<WatchCond>_ 0</WatchCond>
|
||||
<Watch0>_ 0 "0x00000000" 4294967295 "0xFFFFFFFF" 0 "0x00000000" 4294967295 "0xFFFFFFFF" 3 0 0 0</Watch0>
|
||||
<Watch1>_ 0 "0x00000000" 4294967295 "0xFFFFFFFF" 0 "0x00000000" 4294967295 "0xFFFFFFFF" 3 0 0 0</Watch1>
|
||||
<jlinkResetStyle>12</jlinkResetStyle>
|
||||
<jlinkResetStrategy>0</jlinkResetStrategy>
|
||||
<LeaveTargetRunning>_ 0</LeaveTargetRunning>
|
||||
<CStepIntDis>_ 0</CStepIntDis>
|
||||
<jlinkResetStyle>12</jlinkResetStyle>
|
||||
<jlinkResetStrategy>0</jlinkResetStrategy>
|
||||
</JLinkDriver>
|
||||
<ArmDriver>
|
||||
<EnableCache>0</EnableCache>
|
||||
@ -89,6 +89,16 @@
|
||||
<Enabled>0</Enabled>
|
||||
<ShowSource>0</ShowSource>
|
||||
</Trace2>
|
||||
<DisassembleMode>
|
||||
<mode>0</mode>
|
||||
</DisassembleMode>
|
||||
<Breakpoints2>
|
||||
<Bp0>_ 1 "EMUL_CODE" "{$PROJ_DIR$\PROJECT\drivers\mfrc522\rfid-spi.c}.321.7" 0 0 1 "" 0 "" 0</Bp0>
|
||||
<Bp1>_ 1 "EMUL_CODE" "{$PROJ_DIR$\PROJECT\drivers\mfrc522\rfid-spi.c}.190.3" 0 0 1 "" 0 "" 0</Bp1>
|
||||
<Bp2>_ 1 "EMUL_CODE" "{$PROJ_DIR$\PROJECT\drivers\mfrc522\mfrc522data.c}.210.15" 0 0 1 "" 0 "" 0</Bp2>
|
||||
<Bp3>_ 1 "EMUL_CODE" "{$PROJ_DIR$\PROJECT\drivers\mfrc522\mfrc522data.c}.216.5" 0 0 1 "" 0 "" 0</Bp3>
|
||||
<Count>4</Count>
|
||||
</Breakpoints2>
|
||||
<TermIOLog>
|
||||
<LoggingEnabled>_ 0</LoggingEnabled>
|
||||
<LogFile>_ ""</LogFile>
|
||||
@ -98,6 +108,10 @@
|
||||
<LogFile>_ ""</LogFile>
|
||||
<Category>_ 0</Category>
|
||||
</LogFile>
|
||||
<Aliases>
|
||||
<Count>0</Count>
|
||||
<SuppressDialog>0</SuppressDialog>
|
||||
</Aliases>
|
||||
<DriverProfiling>
|
||||
<Enabled>0</Enabled>
|
||||
<Mode>1</Mode>
|
||||
@ -110,18 +124,4 @@
|
||||
<CallStackStripe>
|
||||
<ShowTiming>1</ShowTiming>
|
||||
</CallStackStripe>
|
||||
<DisassembleMode>
|
||||
<mode>0</mode>
|
||||
</DisassembleMode>
|
||||
<Breakpoints2>
|
||||
<Bp0>_ 1 "EMUL_CODE" "{$PROJ_DIR$\PROJECT\drivers\mfrc522\rfid-spi.c}.321.7" 0 0 1 "" 0 "" 0</Bp0>
|
||||
<Bp1>_ 1 "EMUL_CODE" "{$PROJ_DIR$\PROJECT\drivers\mfrc522\rfid-spi.c}.190.3" 0 0 1 "" 0 "" 0</Bp1>
|
||||
<Bp2>_ 1 "EMUL_CODE" "{$PROJ_DIR$\PROJECT\drivers\mfrc522\mfrc522data.c}.210.15" 0 0 1 "" 0 "" 0</Bp2>
|
||||
<Bp3>_ 1 "EMUL_CODE" "{$PROJ_DIR$\PROJECT\drivers\mfrc522\mfrc522data.c}.216.5" 0 0 1 "" 0 "" 0</Bp3>
|
||||
<Count>4</Count>
|
||||
</Breakpoints2>
|
||||
<Aliases>
|
||||
<Count>0</Count>
|
||||
<SuppressDialog>0</SuppressDialog>
|
||||
</Aliases>
|
||||
</settings>
|
||||
|
||||
File diff suppressed because one or more lines are too long
4316
sk-mlpc2368.dep
4316
sk-mlpc2368.dep
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user