Исправление ошибок

This commit is contained in:
Dmitriy 2025-06-09 00:09:34 +03:00
parent ca5f28a589
commit a262811765
9 changed files with 1657 additions and 1624 deletions

View File

@ -2308,13 +2308,13 @@ void UserPrintPaymentErrorMenu(void)
void UserPrintAbonementPaymentErrorMenu(void)
{
char buf[32];
sprintf(buf, " ");
PrintUserMenuStr(buf, 0);
sprintf(buf, " Ïî ıòîé ÊÀĞÒÅ ÇÀÃÀĞÀ");
PrintUserMenuStr(buf, 1);
PrintUserMenuStr(buf, 0);
sprintf(buf, " ñåãîäíÿ ïîñåùåíèÿ");
PrintUserMenuStr(buf, 2);
PrintUserMenuStr(buf, 1);
sprintf(buf, " èñ÷åğïàíû");
PrintUserMenuStr(buf, 2);
sprintf(buf, " ");
PrintUserMenuStr(buf, 3);
}

View File

@ -118,6 +118,7 @@ void IncSolarAbonementCounters(CPU_INT08U ch, CPU_INT08U mode, CPU_INT32U money,
counters.solar_m[mode].card_bonus += bonus;
counters.abonement_money += money;
counters.common_money += money;
counters.checksum = crc16((unsigned char*)&counters, offsetof(SolarCounters, checksum));
WriteArrayFram(offsetof(TFramMap, solar_counters), sizeof(SolarCounters), (unsigned char*)&counters);
@ -161,18 +162,18 @@ void IncSolarCounters(CPU_INT08U ch, CPU_INT08U mode, CPU_INT32U worktime, CPU_I
counters.uf_time[ch] += worktime;
}
counters.common_money += money;
if(card == 2)
{
//counters.abonement_money += money;
}
else if (card)
{
counters.common_money += money;
counters.card_money += money;
}
else
{
counters.common_money += money;
counters.cash_money += money;
}
@ -1050,13 +1051,24 @@ void AppVladEventProcess(CPU_INT32U event)
&& rtc_data_currnet.year == rtc_data_abonement.year
&& data->fileds.count_use >= count_use)
{
TEventRecord record; // 18 + 4 = 22
record.event = JOURNAL_EVENT_CARD_ABONEMENT_REAPEATE; // +1
record.type_abonement = app_state.current_abonement; // +1
record.money = 0; // +2
record.bonus = 0; // +2
record.time_before = 0; // +4
record.number_abonement = data->number_abonement; // +4
record.money_sum = data->money; // +2
record.bonus_sum = data->bonus; // +2
SaveEventAbonementRecord(&record);
// ñåãîäíÿ îïëàòà óæå áûëà óêàçàííîå êîëè÷åñòâî ðàç - óõîäèì â îøèáêó
UserPrintAbonementPaymentErrorMenu();
RefreshMenu();
app_state.user_menu = USER_MENU_ABONEMENT_FAIL;
app_state.menu_timeout = MENU_CARD_FAIL_TIMEOUT;
write_mifare_card();
stop_card_working();
break;
}
@ -1157,9 +1169,21 @@ void AppVladEventProcess(CPU_INT32U event)
stop_card_working();
}
} else {
if(app_state.user_menu == USER_MENU_ABONENT_PROCESSING)
{
app_state.user_menu = USER_MENU_SELECT_PAY_TYPE;
app_state.pay_index = 0;
app_state.blink_ctr = 0;
PrintSelectPayTypeMenu(0);
RefreshMenu();
PlayMusicFile(8);
}
else
{
app_state.user_menu = USER_MENU_IDLE;
}
}
}
// åñëè èíêàññàöèÿ, íå ðàáîòàåì
if (incassation)

View File

@ -226,6 +226,9 @@ void GetEventStr(char* str, char event)
case JOURNAL_EVENT_ABONEMENT_PAY_ACCEPTED:
sprintf(str, "ÁÊÇ.ïîïîëí.");
break;
case JOURNAL_EVENT_CARD_ABONEMENT_REAPEATE:
sprintf(str, "ÁÊÇ.îòêàç.Ïîâòîð");
break;
case JOURNAL_EVENT_ABONEMENT_PAY_REJECTED:
sprintf(str, "ÁÊÇ.ïîïîëí.");
break;

View File

@ -113,7 +113,9 @@ typedef struct{
#define JOURNAL_EVENT_CARD_ABONEMENT_ACCEPTED 60 // ïðèíÿòà êàðòà, ñóììà áåçíàëà - îïëàòà àáîíåìåíòà
#define JOURNAL_EVENTS_COUNT (JOURNAL_EVENT_CARD_ABONEMENT_ACCEPTED+FR_ERROR_NUMBER) // ÷èñëî ñîáûòèé
#define JOURNAL_EVENT_CARD_ABONEMENT_REAPEATE 61 // ïðåâûøåíî êîëè÷åñòâî ïîñåùåíèé â äåíü
#define JOURNAL_EVENTS_COUNT (JOURNAL_EVENT_CARD_ABONEMENT_REAPEATE+FR_ERROR_NUMBER) // ÷èñëî ñîáûòèé
// êàíàë
union

View File

@ -2406,6 +2406,10 @@ void PrintEventJournalRecord(TEventRecord *record, char *str_event, char *str_da
{
sprintf(str_data, "%x %dðóá %dÁ", record->number_abonement, record->money_sum, record->bonus_sum);
}
else if (record->event == JOURNAL_EVENT_CARD_ABONEMENT_REAPEATE)
{
sprintf(str_data, "%x %dðóá %dÁ", record->number_abonement, record->money_sum, record->bonus_sum);
}
else if (record->event == JOURNAL_EVENT_ABONEMENT_PAY_REJECTED)
{
sprintf(&str_event[strlen(str_event)], "Ïîñò %d", record->channel+1);

View File

@ -4,7 +4,7 @@
#if defined(BOARD_SOLARIUM_WEB)
#define DEVICE_FW_VERSION "7.09"
#elif defined(BOARD_SOLARIUM_VLAD)
#define DEVICE_FW_VERSION "8.53"
#define DEVICE_FW_VERSION "8.54"
#elif defined(BOARD_CENTRAL_CARWASH) || defined(BOARD_POST_CARWASH)
#define DEVICE_FW_VERSION "5.55"
#endif

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@ -5003,7 +5003,7 @@
</option>
<option>
<name>OOCOutputFile</name>
<state>solarium_vlad_8_53.hex</state>
<state>solarium_vlad_8_54.hex</state>
</option>
<option>
<name>OOCCommandLineProducer</name>