Add collected changes from T.Sax

This commit is contained in:
2024-07-04 14:01:43 +02:00
parent ab5a343ab2
commit b0e55d8ea4
16 changed files with 2623 additions and 338 deletions

View File

@@ -2,6 +2,7 @@
matching interfaces.h:
// History
// 11.10.2021: V1.0 222 functions
// 23.12.2021: V1.1 added block-parameter to function "read mifare data"
// 30.12.2021: V1.2 added function: mif_clearDataBuffer(), mif_isBlockAvailable(uint8_t blkNr) and mif_getAvailableDataBlocks()
@@ -14,12 +15,32 @@ matching interfaces.h:
// V3.2 Bootloader improvement
// 12.04.2023: V3.3 new features extended: loading and using Json-files, cash-collection, cash-data-logging
14.7.23TS: patch for correct printer state in line 3364 in sys_getDeviceConditions(struct T_moduleCondition *devCond) const
8.9.2023 two new functions (end of file) for mifare test. Interface version 4.4 DC4.40...4.43
14.09.2023: Verriegelung eingebaut, nur noch gültige Abr.Daten zurückgeben, Suchbegriff: <epi_restoreVaultRecord>
alle Mifare-Funktionen ueberprueft und ggf verbessert
18.09.2023: Signal "Kasse entnommen" und Signale "Tuer auf/zu" ueberprueft
20.9.2023: in datif die Abfrage der DynMachineData massiv beschleunigt
und hier in hwapi die entprellten Werte fuer Tueren und Kasse verwenden.
Problem war: Signal "Kasse entnommen" war zu langsam -> manchmal abr nicht gesendet
14.3.24 new function bool hwapi::cash_isCollectionStarted(void) const
padding three struct to 64 byte to avoid stack overflow when using
//#define HWINF_iid "Atb.Psa2020.software.HWapi/3.1"
//#define HWINF_iid "Atb.Psa1256ptu5.software.HWapi/3.1"
#define HWINF_iid "Atb.Psa1256ptu5.software.HWapi/3.3"
V4.0 6.9.2023: activating DC-Bootloader in slve-lib (SM)
23.5.2024: prn_getHwState() fixed and moved down to runProc with a wrapper in hwapi, current version: 5.5
several new functions for "direct ticket print", without the dueway loading jsons to DC and cmd DC to print
The same rules as before apply to the json, but it can have any arbitrary length
*/
@@ -569,12 +590,10 @@ public:
// read printer condition and settings
uint8_t prn_getHwState(struct Tprn_hw_state *prn_hw_state) const override;
// retval: status byte
// byte 0 = 0: prnter OK, >0: error
// bit0: paper low 1: no paper 2: temperature error
// 3: head open 4: paper jam in cutter
// 6: no response 7: bad response from printer
// and return struct "Tprn_hw_state"
// return value: =prn_hw_state[0]
// 0:unknown 1: printer OK 100: printer OK but paper near end
// 200: not connected 201: printer on error 202: no paper
bool prn_isUpAndReady(void) const override;
// true: printer is powered, serial is ok, no error, printer is connected and resonding
@@ -603,7 +622,7 @@ public:
void prn_movePaper(uint8_t wayInMm, uint8_t direction) const override;
//direction: 1=forward 2=backward
//
void prn_setFonts(uint8_t font, uint8_t size, uint8_t width, uint8_t height) const override;
// font = kind of font 5...11 (0..22)
// size = 6...20, 9..9: too tiny 10: small ...12 = normal size ...20=huge
@@ -1037,7 +1056,6 @@ public:
void sys_getDynMachineConditions(struct T_dynamicCondition *dynMachCond) const override;
uint32_t cash_getAmountInVault(void) const override;
uint16_t cash_getNrCoinsInVault(void) const override;
@@ -1358,6 +1376,30 @@ public:
virtual QObject const *getAPI() override;
void mod_switchResetline(void) override;
// 22.5.2024 direct ticket printing
void prn_translateLocalPrinterJson(QByteArray jsonFile2print) const override;
// load, parse, translate and save the file
void prnStoreDynamics(char *bufferDynPrintVars[], uint8_t nrOfDyns) const override;
// store nrOfDyns (up to 16) dynamics before printing
// max length = 16 byte per dynamic
// 16 strings with up to 16bytes each
void prn_printTranslatedTicket(void) const override;
uint8_t prn_waitForDirectTicket(void) const override;
signals:
void hwapi_reportDCDownloadStatus(QString const&) const override;
void hwapi_reportDCDownloadSuccess(QString const&) const override;
@@ -1389,6 +1431,8 @@ signals:
void hwapi_coinAttached() const override;
private slots:
//void hwapi_slotPrintFinished_OK(void);
//void hwapi_slotPrintFinished_Err(void);