длинные счетчики базнала, в журнале по безналу нормальные записи

This commit is contained in:
Dmitriy 2023-01-23 22:33:08 +03:00
parent d856c9fd24
commit c7cbea09a7
12 changed files with 5977 additions and 733 deletions

Binary file not shown.

5212
Flash/Exe/solarium_3_39.hex Normal file

File diff suppressed because it is too large Load Diff

View File

@ -272,7 +272,6 @@ void UserAppTask(void *p_arg)
UserPrintMoneyMenu();
RefreshMenu();
}
SaveEventRecord(RecentChannel, JOURNAL_EVENT_MONEY_COIN, money);
CPU_INT32U price=1, pricetime=0, maxtime = 0xffffffff;
GetRecentChannelPrice(RecentChannel, &price, &pricetime);
@ -567,6 +566,7 @@ void UserAppTask(void *p_arg)
{
if (PrintFiscalBill(accmoneyBank, (pricetime*accmoneyBank*60)/price, 1, price, pricetime) == 0)
{
SaveEventRecord(RecentChannel, JOURNAL_EVENT_MONEY_COIN, accmoneyBank);
SaveEventRecord(RecentChannel, JOURNAL_EVENT_PRINT_BILL_ONLINE, GetTimeSec());
}
else

View File

@ -391,7 +391,8 @@ void IncCounter(CPU_INT08U ch, CPU_INT32U time, CPU_INT32U money, CPU_INT32U mon
long_ctrs.CounterChannelBankMoneyLong[ch] += moneyBank;
long_ctrs.CounterRunLong++;
long_ctrs.CounterTimeLong += time;
long_ctrs.CounterMoneyLong += (money + moneyBank);
long_ctrs.CounterMoneyLong += money;
long_ctrs.CounterMoneyBankLong += moneyBank;
long_ctrs.crc = CRC16((unsigned char*)&long_ctrs, offsetof(TCountersLong, crc));
WriteArrayFram(offsetof(TFramMap, CountersLong), sizeof(TCountersLong), (unsigned char*)&long_ctrs);
}

View File

@ -156,6 +156,8 @@ typedef struct{
CPU_INT32U CounterRunLong;
CPU_INT32U CounterTimeLong;
CPU_INT32U CounterMoneyLong;
CPU_INT32U CounterMoneyBankLong;
CPU_INT16U crc;
}TCountersLong;

View File

@ -1928,6 +1928,27 @@ TDataDescStruct const CounterLongMoneyDesc = {
0
};
/*************************************
счетчик bank денег ДЛИННЫЙ
*************************************/
TDataDescStruct const CounterLongMoneyBankDesc = {
DATA_DESC_VIEW, // тип дескриптора
DATA_TYPE_ULONG, // тип параметра
DATA_LOC_FRAM, // расположение параметра
DATA_NO_ARRAY, // признак массива
0, // размер массива
NULL, // указатель на десриптор индекса массива
(void*)offsetof(TFramMap, CountersLong.CounterMoneyBankLong), // указатель на переменную или адрес FRAM
NULL, // указатель на границы параметра
NULL, // функция по изменению
0, // смещение между элементами в массиве
CounterMoneyBankName, // указатель на строку названия параметра
DATA_NO_INDEX, // признак индексного параметра (список строк)
NULL, // указатель на список строк для индексного параметра
DATA_INIT_DISABLE,
0
};
/*************************************
Общий счетчик времени работы
*************************************/

View File

@ -176,6 +176,7 @@ extern TDataDescStruct const BillCounterDesc;
extern TDataDescStruct const CounterLongRunDesc;
extern TDataDescStruct const CounterLongMoneyDesc;
extern TDataDescStruct const CounterLongMoneyBankDesc;
extern TDataDescStruct const CounterLongTimeDesc;
extern TDataDescStruct const MasterPassTempDesc;

View File

@ -427,7 +427,7 @@ const TMenuLine line_CommonCountersMenu_3 = {
};
const TMenuLineArray arr_CommonCountersArray[] = {&line_CommonCountersMenu_0, &line_CommonCountersMenu_1, &line_CommonCountersMenu_2, &line_CommonCountersMenu_4, &line_CommonCountersMenu_3, NULL};
const TMenuPanel CommonCountersPanel[] = {arr_CommonCountersArray, NULL, 5, MENU_PANEL_STATIC};
const TMenuPanel CommonCountersPanel[] = {arr_CommonCountersArray, NULL, 5, MENU_PANEL_STANDARD};
/***********************************
ÌÅÍÞ ÎÁÙÀß ÑÒÀÒÈÑÒÈÊÀ ÄËÈÍÍÛÅ Ñ×ÅÒ×ÈÊÈ
@ -455,6 +455,13 @@ const TMenuLine line_CommonCountersLongMenu_2 = {
NULL // ïàíåëü äëÿ ïåðåõîäà
};
const TMenuLine line_CommonCountersLongMenu_4 = {
MENU_LINE_SHOW_DESC, // òèï ïóíêòà ìåíþ
0, // äîï. ôëàãè
(void*)&CounterLongMoneyBankDesc, // óêàçàòåëü íà òåêñòîâóþ ñòðîêó èëè äåñêðèïòîð
NULL // ïàíåëü äëÿ ïåðåõîäà
};
const TMenuLine line_CommonCountersLongMenu_3 = {
MENU_LINE_SHOW_DESC, // òèï ïóíêòà ìåíþ
0, // äîï. ôëàãè
@ -462,8 +469,8 @@ const TMenuLine line_CommonCountersLongMenu_3 = {
NULL // ïàíåëü äëÿ ïåðåõîäà
};
const TMenuLineArray arr_CommonCountersLongArray[] = {&line_CommonCountersLongMenu_0, &line_CommonCountersLongMenu_1, &line_CommonCountersLongMenu_2, &line_CommonCountersLongMenu_3, NULL};
const TMenuPanel CommonCountersLongPanel[] = {arr_CommonCountersLongArray, NULL, 4, MENU_PANEL_STATIC};
const TMenuLineArray arr_CommonCountersLongArray[] = {&line_CommonCountersLongMenu_0, &line_CommonCountersLongMenu_1, &line_CommonCountersLongMenu_2, &line_CommonCountersLongMenu_4, &line_CommonCountersLongMenu_3, NULL};
const TMenuPanel CommonCountersLongPanel[] = {arr_CommonCountersLongArray, NULL, 4, MENU_PANEL_STANDARD};
/***********************************
ÌÅÍÞ ÍÀÑÒÐÎÉÊÈ

View File

@ -1,7 +1,7 @@
#ifndef _VERSION_H_
#define _VERSION_H_
#define DEVICE_FW_VERSION "03.38"
#define DEVICE_FW_VERSION "03.39"
#endif // #ifndef _VERSION_H_

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@ -650,7 +650,7 @@
</option>
<option>
<name>OOCOutputFile</name>
<state>solarium_3_38.hex</state>
<state>solarium_3_39.hex</state>
</option>
<option>
<name>OOCCommandLineProducer</name>