From e67402b3cffe7499902d67c219c772eb143cbecb Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Wed, 30 Sep 2020 14:43:29 +0300 Subject: some fixes for logs, for 4 winders diagnostics --- Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Software/Embedded_SW/Embedded/Modules/Thread') diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c index 4f77104d4..e7336cc9d 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c @@ -1256,7 +1256,6 @@ uint32_t ThreadPrepareState(void *JobDetails) //AddControlCallback(NULL,ThreadControlSpeedReadFunction, eHundredMillisecond,MotorGetSpeedFromFPGA,(IfTypeThread*0x100+Motor_i),ThreadMotorIdToMotorId[Motor_i],Motor_i); #endif } -#endif if (Motor_i == POOLER_MOTOR) // dryer motor is speed controlled. later a speed sensor will be utilized, but for now it will n//ot be controlled { if (ControlIdtoMotorId[Motor_i] != 0xFF) @@ -1270,6 +1269,7 @@ uint32_t ThreadPrepareState(void *JobDetails) ControlIdtoMotorId[Motor_i] = AddControlCallback(NULL,ThreadControlCBFunction, eOneMillisecond,Control_Read_Dancer_Position,(IfTypeThread*0x100+Motor_i),ThreadMotorIdToDancerId[Motor_i],Motor_i); #endif } +#endif if (Motor_i == WINDER_MOTOR) // dryer motor is speed controlled. later a speed sensor will be utilized, but for now it will n//ot be controlled { ReportWithPackageFilter(ThreadFilter,"Winder Control",__FILE__,Motor_i,MotorControlConfig[Motor_i].m_params.Kp,RpWarning,MotorControlConfig[Motor_i].m_params.Ki,0); -- cgit v1.3.1 From 7f6a0eb88514f7f60a66bad3ecc1cb4cae0ed2ea Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Tue, 6 Oct 2020 21:22:51 +0300 Subject: valves mitigatio trial, heaters max temperature handling. IDS pressure building control.loading fixed. bug in winder prepare fixed, RFID tag update in Protobuf --- .../Embedded/Common/Utilities/RFIDTagHandling.c | 238 +++++++++++---------- .../Embedded/Common/Utilities/RFIDTagHandling.h | 114 ---------- .../PMR/Diagnostics/CartridgeTagContent.pb-c.c | 155 ++++++++------ .../PMR/Diagnostics/CartridgeTagContent.pb-c.h | 69 +++--- .../Embedded_SW/Embedded/Drivers/Valves/Valve.c | 20 +- .../Embedded/Modules/General/GeneralHardware.c | 4 +- .../Embedded/Modules/Heaters/Heaters_print.c | 104 ++++++--- .../Embedded_SW/Embedded/Modules/IDS/IDS_maint.c | 4 +- Software/Embedded_SW/Embedded/Modules/IFS/ifs.c | 2 +- .../Embedded/Modules/Thread/ThreadLoad.c | 4 +- .../Embedded/Modules/Thread/Thread_Winder.c | 3 +- .../Messages/Diagnostics/CartridgeTagContent.proto | 66 +++--- 12 files changed, 371 insertions(+), 412 deletions(-) (limited to 'Software/Embedded_SW/Embedded/Modules/Thread') diff --git a/Software/Embedded_SW/Embedded/Common/Utilities/RFIDTagHandling.c b/Software/Embedded_SW/Embedded/Common/Utilities/RFIDTagHandling.c index b210d79fc..f6bc50a7e 100644 --- a/Software/Embedded_SW/Embedded/Common/Utilities/RFIDTagHandling.c +++ b/Software/Embedded_SW/Embedded/Common/Utilities/RFIDTagHandling.c @@ -85,51 +85,62 @@ typedef struct uint32_t Checksum_CRC16:16; }NFCTag_t; - struct _CartridgeTagContent +struct _CartridgeTagContent { ProtobufCMessage base; - protobuf_c_boolean has_uniqueid; - uint32_t uniqueid; - char *serialnumber; - char *factoryid; - protobuf_c_boolean has_fillingsystemid; - int32_t fillingsystemid; + char *taguniqueid; + char *cartsn; + protobuf_c_boolean has_inkfactoryid; + uint32_t inkfactoryid; + protobuf_c_boolean has_fillsysid; + uint32_t fillsysid; + char *workorder; char *colorname; - protobuf_c_boolean has_colorcategory; - int32_t colorcategory; - protobuf_c_boolean has_colortyperevision; - int32_t colortyperevision; + protobuf_c_boolean has_inkcategory; + uint32_t inkcategory; + protobuf_c_boolean has_type_rev; + uint32_t type_rev; protobuf_c_boolean has_cartridgesize; - int32_t cartridgesize; - protobuf_c_boolean has_filledinkvolume; - int32_t filledinkvolume; - char *inkbatchnum; + uint32_t cartridgesize; + protobuf_c_boolean has_filedinkvol; + uint32_t filedinkvol; + char *inkbatchno; char *inkmfgdate; char *inkeoldate; - char *cartridgefillingdate; - char *wastefilleddate; + char *cartfilldate; + char *wastefilldate; + protobuf_c_boolean has_misc; + uint32_t misc; protobuf_c_boolean has_plugincounter; - int32_t plugincounter; - protobuf_c_boolean has_inkfill; - protobuf_c_boolean inkfill; - protobuf_c_boolean has_inkused; - protobuf_c_boolean inkused; - protobuf_c_boolean has_inkempty; - protobuf_c_boolean inkempty; - protobuf_c_boolean has_wasteempty; - protobuf_c_boolean wasteempty; - protobuf_c_boolean has_wastefilling; - protobuf_c_boolean wastefilling; - protobuf_c_boolean has_wastefull; - protobuf_c_boolean wastefull; + uint32_t plugincounter; + protobuf_c_boolean has_inkfillstatus; + protobuf_c_boolean inkfillstatus; + protobuf_c_boolean has_inkusedstatus; + protobuf_c_boolean inkusedstatus; + protobuf_c_boolean has_inkemptystatus; + protobuf_c_boolean inkemptystatus; + protobuf_c_boolean has_wasteemptystatus; + protobuf_c_boolean wasteemptystatus; + protobuf_c_boolean has_wastefillingstatus; + protobuf_c_boolean wastefillingstatus; + protobuf_c_boolean has_wastefullstatus; + protobuf_c_boolean wastefullstatus; protobuf_c_boolean has_blocked; protobuf_c_boolean blocked; protobuf_c_boolean has_fail; protobuf_c_boolean fail; protobuf_c_boolean has_wastecounter; - int32_t wastecounter; - char *machineidinkused; - char *machineidwasteused; + uint32_t wastecounter; + char *machineidinl; + char *machineidwst; + char *spare; + protobuf_c_boolean has_counter; + uint32_t counter; + protobuf_c_boolean has_tagvalid; + protobuf_c_boolean tagvalid; + char *hashvalue; + protobuf_c_boolean has_checksum_crc16; + uint32_t checksum_crc16; }; */ CartridgeTagContent * NFCTag_Tag2PPC(NFCTag_t *Tag) @@ -141,50 +152,56 @@ CartridgeTagContent * NFCTag_Tag2PPC(NFCTag_t *Tag) cartridge_tag_content__init(PpcTag); - PpcTag->uniqueid = Tag->TagUniqueID; - PpcTag->serialnumber = Tag->CartSN; - PpcTag->has_factoryid = true; - PpcTag->factoryid = Tag->InkFactoryID; + strncpy(PpcTag->taguniqueid , Tag->TagUniqueID,sizeof(Tag->TagUniqueID)); + strncpy(PpcTag->cartsn , Tag->CartSN,sizeof(Tag->CartSN)); + strncpy(PpcTag->workorder , Tag->WorkOrder,sizeof(Tag->WorkOrder)); + strncpy(PpcTag->colorname , Tag->ColorName,sizeof(Tag->ColorName)); + strncpy(PpcTag->inkbatchno , Tag->InkBatchNo,sizeof(Tag->InkBatchNo)); + strncpy(PpcTag->inkmfgdate , Tag->InkMFGDate,sizeof(Tag->InkMFGDate)); + strncpy(PpcTag->inkeoldate , Tag->InkEOLDate,sizeof(Tag->InkEOLDate)); + strncpy(PpcTag->cartfilldate , Tag->CartFillDate,sizeof(Tag->CartFillDate)); + strncpy(PpcTag->wastefilldate , Tag->WasteFillDate,sizeof(Tag->WasteFillDate)); + strncpy(PpcTag->machineidinl , Tag->MachineIdINL,sizeof(Tag->MachineIdINL)); + strncpy(PpcTag->machineidwst , Tag->MachineIdWST,sizeof(Tag->MachineIdWST)); + strncpy(PpcTag->spare , Tag->Spare,sizeof(Tag->Spare)); + strncpy(PpcTag->hashvalue , Tag->HashValue,sizeof(Tag->HashValue)); - PpcTag->has_fillingsystemid = true; - PpcTag->fillingsystemid = Tag->FillSysID; - PpcTag->workorder = Tag->WorkOrder; - PpcTag->colorname = Tag->ColorName; - PpcTag->has_colorcategory = true; - PpcTag->colorcategory = Tag->InkCategory; - PpcTag->has_colortyperevision = true; - PpcTag->colortyperevision = Tag->Type_Rev; + + + PpcTag->has_inkfactoryid = true; + PpcTag->inkfactoryid = Tag->InkFactoryID; + PpcTag->has_fillsysid = true; + PpcTag->fillsysid = Tag->FillSysID; + PpcTag->has_inkcategory = true; + PpcTag->inkcategory = Tag->InkCategory; + PpcTag->has_type_rev = true; + PpcTag->type_rev = Tag->Type_Rev; PpcTag->has_cartridgesize = true; PpcTag->cartridgesize = Tag->CartridgeSize; - PpcTag->has_filledinkvolume = true; - PpcTag->filledinkvolume = Tag->FiledInkVol; - PpcTag->inkbatchnum = Tag->InkBatchNo; - PpcTag->inkmfgdate = Tag->InkMFGDate; - PpcTag->inkeoldate = Tag->InkEOLDate; - PpcTag->cartridgefillingdate = Tag->CartFillDate; - PpcTag->wastefilleddate = Tag->WasteFillDate; + PpcTag->has_filedinkvol = true; + PpcTag->filedinkvol = Tag->FiledInkVol; + PpcTag->has_misc = true; + PpcTag->misc = Tag->Misc; PpcTag->has_plugincounter = true; PpcTag->plugincounter = Tag->PluginCounter; - PpcTag->has_inkfill = true; - PpcTag->inkfill = Tag->InkFillStatus; - PpcTag->has_inkused = true; - PpcTag->inkused = Tag->InkUsedStatus; - PpcTag->has_inkempty = true; - PpcTag->inkempty = Tag->InkEmptyStatus; - PpcTag->has_wasteempty = true; - PpcTag->wasteempty = Tag->WasteEmptyStatus; - PpcTag->has_wastefilling = true; - PpcTag->wastefilling = Tag->WasteFillingStatus; - PpcTag->has_wastefull = true; - PpcTag->wastefull = Tag->WasteFullStatus; + PpcTag->has_inkfillstatus = true; + PpcTag->inkfillstatus = Tag->InkFillStatus; + PpcTag->has_inkusedstatus = true; + PpcTag->inkusedstatus = Tag->InkUsedStatus; + PpcTag->has_inkemptystatus = true; + PpcTag->inkemptystatus = Tag->InkEmptyStatus; + PpcTag->has_inkemptystatus = true; + PpcTag->inkemptystatus = Tag->WasteEmptyStatus; + PpcTag->has_wastefillingstatus = true; + PpcTag->wastefillingstatus = Tag->WasteFillingStatus; + PpcTag->has_wastefullstatus = true; + PpcTag->wastefullstatus = Tag->WasteFullStatus; PpcTag->has_blocked = true; PpcTag->blocked = Tag->Blocked; PpcTag->has_fail = true; PpcTag->fail = Tag->Fail; PpcTag->has_wastecounter = true; PpcTag->wastecounter = Tag->WasteCounter; - PpcTag->machineidinkused = Tag->MachineIdINL; - PpcTag->machineidwasteused = Tag->MachineIdWST; return PpcTag; } @@ -195,48 +212,51 @@ CartridgeTagContent * NFCTag_Tag2PPC(NFCTag_t *Tag) return NULL; memset (Tag,0,sizeof(Tag)); - memcpy(Tag->TagUniqueID , PpcTag->uniqueid,sizeof(Tag->TagUniqueID)); - memcpy(Tag->CartSN , PpcTag->serialnumber,sizeof(Tag->CartSN)); - if (PpcTag->has_factoryid == true) - Tag->InkFactoryID = PpcTag->factoryid; - if (PpcTag->has_fillingsystemid == true) - Tag->FillSysID = PpcTag->fillingsystemid; - memcpy(Tag->ColorName , PpcTag->colorname,sizeof(Tag->ColorName)); - if (PpcTag->has_colorcategory == true) - Tag->InkCategory = PpcTag->colorcategory; - if (PpcTag->has_colortyperevision == true) - Tag->Type_Rev = PpcTag->colortyperevision; + strncpy(Tag->TagUniqueID , PpcTag->taguniqueid,sizeof(Tag->TagUniqueID)); + strncpy(Tag->CartSN , PpcTag->cartsn,sizeof(Tag->CartSN)); + if (PpcTag->has_inkfactoryid == true) + Tag->InkFactoryID = PpcTag->inkfactoryid; + if (PpcTag->has_fillsysid == true) + Tag->FillSysID = PpcTag->fillsysid; + strncpy(Tag->ColorName , PpcTag->colorname,sizeof(Tag->ColorName)); + strncpy(Tag->WorkOrder , PpcTag->workorder ,sizeof(Tag->WorkOrder)); + if (PpcTag->has_inkcategory == true) + Tag->InkCategory = PpcTag->inkcategory; + if (PpcTag->has_type_rev == true) + Tag->Type_Rev = PpcTag->type_rev; if (PpcTag->has_cartridgesize == true) Tag->CartridgeSize = PpcTag->cartridgesize; - if (PpcTag->has_filledinkvolume == true) - Tag->FiledInkVol = PpcTag->filledinkvolume; - memcpy(Tag->InkBatchNo , PpcTag->inkbatchnum,sizeof(Tag->InkBatchNo)); - memcpy(Tag->InkMFGDate , PpcTag->inkmfgdate,sizeof(Tag->InkMFGDate)); - memcpy(Tag->InkEOLDate , PpcTag->inkeoldate,sizeof(Tag->InkEOLDate)); - memcpy(Tag->CartFillDate , PpcTag->cartridgefillingdate,sizeof(Tag->CartFillDate)); - memcpy(Tag->WasteFillDate , PpcTag->wastefilleddate,sizeof(Tag->WasteFillDate)); + if (PpcTag->has_filedinkvol == true) + Tag->FiledInkVol = PpcTag->filedinkvol; + strncpy(Tag->InkBatchNo , PpcTag->inkbatchno,sizeof(Tag->InkBatchNo)); + strncpy(Tag->InkMFGDate , PpcTag->inkmfgdate,sizeof(Tag->InkMFGDate)); + strncpy(Tag->InkEOLDate , PpcTag->inkeoldate,sizeof(Tag->InkEOLDate)); + strncpy(Tag->CartFillDate , PpcTag->cartfilldate,sizeof(Tag->CartFillDate)); + strncpy(Tag->WasteFillDate , PpcTag->wastefilldate,sizeof(Tag->WasteFillDate)); if (PpcTag->has_plugincounter == true) Tag->PluginCounter = PpcTag->plugincounter; - if (PpcTag->has_inkfill == true) - Tag->InkFillStatus = PpcTag->inkfill; - if (PpcTag->has_inkused == true) - Tag->InkUsedStatus = PpcTag->inkused; - if (PpcTag->has_inkempty == true) - Tag->InkEmptyStatus = PpcTag->inkempty; - if (PpcTag->has_wasteempty == true) - Tag->WasteEmptyStatus = PpcTag->wasteempty; - if (PpcTag->has_wastefilling == true) - Tag->WasteFillingStatus = PpcTag->wastefilling; - if (PpcTag->has_wastefull == true) - Tag->WasteFullStatus = PpcTag->wastefull; + if (PpcTag->has_inkfillstatus == true) + Tag->InkFillStatus = PpcTag->inkfillstatus; + if (PpcTag->has_inkusedstatus == true) + Tag->InkUsedStatus = PpcTag->inkusedstatus; + if (PpcTag->has_inkemptystatus == true) + Tag->InkEmptyStatus = PpcTag->inkemptystatus; + if (PpcTag->has_wasteemptystatus == true) + Tag->WasteEmptyStatus = PpcTag->wasteemptystatus; + if (PpcTag->has_wastefillingstatus == true) + Tag->WasteFillingStatus = PpcTag->wastefillingstatus; + if (PpcTag->has_wastefullstatus == true) + Tag->WasteFullStatus = PpcTag->wastefullstatus; if (PpcTag->has_blocked == true) Tag->Blocked = PpcTag->blocked; if (PpcTag->has_fail == true) Tag->Fail = PpcTag->fail; if (PpcTag->has_wastecounter == true) Tag->WasteCounter = PpcTag->wastecounter; - memcpy(Tag->MachineIdINL , PpcTag->machineidinkused,sizeof(Tag->MachineIdINL)); - memcpy(Tag->MachineIdWST , PpcTag->machineidwasteused,sizeof(Tag->MachineIdWST)); + strncpy(Tag->MachineIdINL , PpcTag->machineidinl,sizeof(Tag->MachineIdINL)); + strncpy(Tag->MachineIdWST , PpcTag->machineidwst,sizeof(Tag->MachineIdWST)); + strncpy(Tag->Spare,PpcTag->spare ,sizeof(Tag->Spare)); + strncpy(Tag->HashValue,PpcTag->hashvalue ,sizeof(Tag->HashValue)); return Tag; @@ -302,13 +322,13 @@ RfidTagContent * RFID_PPC2Tag( CartridgeTagContent *PpcTag) return NULL; memset (Tag,0,sizeof(Tag)); - memcpy(Tag->uniqueid , PpcTag->uniqueid,sizeof(Tag->uniqueid)); - memcpy(Tag->serialnumber , PpcTag->serialnumber,sizeof(Tag->serialnumber)); - memcpy(Tag->factoryid , PpcTag->factoryid,sizeof(Tag->factoryid)); + strncpy(Tag->uniqueid , PpcTag->uniqueid,sizeof(Tag->uniqueid)); + strncpy(Tag->serialnumber , PpcTag->serialnumber,sizeof(Tag->serialnumber)); + strncpy(Tag->factoryid , PpcTag->factoryid,sizeof(Tag->factoryid)); if (PpcTag->has_fillingsystemid == true) Tag->fillingsystemid = PpcTag->fillingsystemid; - memcpy(Tag->colorname , PpcTag->colorname,sizeof(Tag->colorname)); + strncpy(Tag->colorname , PpcTag->colorname,sizeof(Tag->colorname)); if (PpcTag->has_colorcategory == true) Tag->colorcategory = PpcTag->colorcategory; if (PpcTag->has_colortyperevision == true) @@ -317,11 +337,11 @@ RfidTagContent * RFID_PPC2Tag( CartridgeTagContent *PpcTag) Tag->cartridgesize = PpcTag->cartridgesize; if (PpcTag->has_filledinkvolume == true) Tag->filledinkvolume = PpcTag->filledinkvolume; - memcpy(Tag->inkbatchnum , PpcTag->inkbatchnum,sizeof(Tag->inkbatchnum)); - memcpy(Tag->inkmfgdate , PpcTag->inkmfgdate,sizeof(Tag->inkmfgdate)); - memcpy(Tag->inkeoldate , PpcTag->inkeoldate,sizeof(Tag->inkeoldate)); - memcpy(Tag->cartridgefillingdate , PpcTag->cartridgefillingdate,sizeof(Tag->cartridgefillingdate)); - memcpy(Tag->wastefilleddate , PpcTag->wastefilleddate,sizeof(Tag->wastefilleddate)); + strncpy(Tag->inkbatchnum , PpcTag->inkbatchnum,sizeof(Tag->inkbatchnum)); + strncpy(Tag->inkmfgdate , PpcTag->inkmfgdate,sizeof(Tag->inkmfgdate)); + strncpy(Tag->inkeoldate , PpcTag->inkeoldate,sizeof(Tag->inkeoldate)); + strncpy(Tag->cartridgefillingdate , PpcTag->cartridgefillingdate,sizeof(Tag->cartridgefillingdate)); + strncpy(Tag->wastefilleddate , PpcTag->wastefilleddate,sizeof(Tag->wastefilleddate)); if (PpcTag->has_plugincounter == true) Tag->plugincounter = PpcTag->plugincounter; if (PpcTag->has_inkfill == true) @@ -342,8 +362,8 @@ RfidTagContent * RFID_PPC2Tag( CartridgeTagContent *PpcTag) Tag->fail = PpcTag->fail; if (PpcTag->has_wastecounter == true) Tag->wastecounter = PpcTag->wastecounter; - memcpy(Tag->machineidinkused , PpcTag->machineidinkused,sizeof(Tag->machineidinkused)); - memcpy(Tag->machineidwasteused , PpcTag->machineidwasteused,sizeof(Tag->machineidwasteused)); + strncpy(Tag->machineidinkused , PpcTag->machineidinkused,sizeof(Tag->machineidinkused)); + strncpy(Tag->machineidwasteused , PpcTag->machineidwasteused,sizeof(Tag->machineidwasteused)); return Tag; diff --git a/Software/Embedded_SW/Embedded/Common/Utilities/RFIDTagHandling.h b/Software/Embedded_SW/Embedded/Common/Utilities/RFIDTagHandling.h index 192f1e075..496b1aae3 100644 --- a/Software/Embedded_SW/Embedded/Common/Utilities/RFIDTagHandling.h +++ b/Software/Embedded_SW/Embedded/Common/Utilities/RFIDTagHandling.h @@ -9,120 +9,6 @@ #include "PMR/Diagnostics/CartridgeTagContent.pb-c.h" #include -/* - typedef struct -{ - uint8_t TagUniqueID[8]; //RFID Tag unique ID - char SerialNumber[16]; - char FactoryId[3]; - int32_t FillingSystemId; - char ColorName[12]; - int32_t ColorCategory; - int32_t ColorTypeRevision; - int32_t CartridgeSize; - int32_t FilledInkVolume; - char InkBatchNum[10]; - char InkMFGDate[6]; - char InkEOLDate[6]; - char CartridgeFillingDate[6]; - char WasteFilledDate[6]; - int32_t PlugInCounter; - bool Inkfill; - bool InkUsed; - bool InkEmpty; - bool WasteEmpty; - bool WasteFilling; - bool WasteFull; - bool Blocked; - bool Fail; - int32_t WasteCounter; - char MachineIdInkUsed[16]; - char MachineIdWasteUsed[16]; -}RfidTagContent; -typedef struct -{ - uint8_t TagUniqueID[8]; //RFID Tag unique ID - uint8_t CartSN[16]; //Cartridge serial number - uint32_t InkFactoryID:24; //Ink factory ID - uint32_t FillSysID:16; //Filling system ID number - uint8_t WorkOrder[10]; //Color description / ID - uint8_t ColorName[12]; //Color description / ID - uint32_t InkCategory:16; //Ink category (TBD) - uint32_t Type_Rev; //TBD – can be formulation # - uint32_t CartridgeSize; //Size in cc - uint32_t FiledInkVol; //Size in cc - uint8_t InkBatchNo[10]; //MFG batch No’ - uint8_t InkMFGDate[6]; //Date Ink was manufactured (20L container bar-code) - uint8_t InkEOLDate[6]; //Ink end of life date - uint8_t CartFillDate[6]; //Date cartridge was filled with ink (CFS) - uint8_t WasteFillDate[6]; //Date cartridge was filled with waste (Machine) - uint32_t Misc; - uint32_t PluginCounter:16; //Number of times cartridge was plugged in INK Slot - uint8_t InkFillStatus; //State indicator - successful state change when starting to fill mid. tank - uint8_t InkUsedStatus; - uint8_t InkEmptyStatus; - uint8_t WasteEmptyStatus; - uint8_t WasteFillingStatus; - uint8_t WasteFullStatus; - uint8_t Blocked; - uint8_t Fail; - uint32_t WasteCounter:16; - uint8_t MachineIdINL[16]; - uint8_t MachineIdWST[16]; - uint8_t Spare[13]; - uint32_t Counter; - uint8_t TagValid; - uint8_t HashValue[32]; - uint32_t Checksum_CRC16:16; -}NFCTag_t; - - struct _CartridgeTagContent -{ - ProtobufCMessage base; - protobuf_c_boolean has_uniqueid; - uint32_t uniqueid; - char *serialnumber; - char *factoryid; - protobuf_c_boolean has_fillingsystemid; - int32_t fillingsystemid; - char *colorname; - protobuf_c_boolean has_colorcategory; - int32_t colorcategory; - protobuf_c_boolean has_colortyperevision; - int32_t colortyperevision; - protobuf_c_boolean has_cartridgesize; - int32_t cartridgesize; - protobuf_c_boolean has_filledinkvolume; - int32_t filledinkvolume; - char *inkbatchnum; - char *inkmfgdate; - char *inkeoldate; - char *cartridgefillingdate; - char *wastefilleddate; - protobuf_c_boolean has_plugincounter; - int32_t plugincounter; - protobuf_c_boolean has_inkfill; - protobuf_c_boolean inkfill; - protobuf_c_boolean has_inkused; - protobuf_c_boolean inkused; - protobuf_c_boolean has_inkempty; - protobuf_c_boolean inkempty; - protobuf_c_boolean has_wasteempty; - protobuf_c_boolean wasteempty; - protobuf_c_boolean has_wastefilling; - protobuf_c_boolean wastefilling; - protobuf_c_boolean has_wastefull; - protobuf_c_boolean wastefull; - protobuf_c_boolean has_blocked; - protobuf_c_boolean blocked; - protobuf_c_boolean has_fail; - protobuf_c_boolean fail; - protobuf_c_boolean has_wastecounter; - int32_t wastecounter; - char *machineidinkused; - char *machineidwasteused; -}; - */ CartridgeTagContent * NFCTag_Tag2PPC(NFCTag_t *Tag); NFCTag_t * NFCTag_PPC2Tag( CartridgeTagContent *PpcTag); diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/CartridgeTagContent.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/CartridgeTagContent.pb-c.c index f2589f248..7d84933d4 100644 --- a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/CartridgeTagContent.pb-c.c +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/CartridgeTagContent.pb-c.c @@ -52,7 +52,7 @@ void cartridge_tag_content__free_unpacked assert(message->base.descriptor == &cartridge_tag_content__descriptor); protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); } -static const ProtobufCFieldDescriptor cartridge_tag_content__field_descriptors[32] = +static const ProtobufCFieldDescriptor cartridge_tag_content__field_descriptors[33] = { { "", @@ -60,7 +60,7 @@ static const ProtobufCFieldDescriptor cartridge_tag_content__field_descriptors[3 PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_STRING, 0, /* quantifier_offset */ - offsetof(CartridgeTagContent, uniqueid), + offsetof(CartridgeTagContent, taguniqueid), NULL, NULL, 0, /* flags */ @@ -72,7 +72,7 @@ static const ProtobufCFieldDescriptor cartridge_tag_content__field_descriptors[3 PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_STRING, 0, /* quantifier_offset */ - offsetof(CartridgeTagContent, serialnumber), + offsetof(CartridgeTagContent, cartsn), NULL, NULL, 0, /* flags */ @@ -82,9 +82,9 @@ static const ProtobufCFieldDescriptor cartridge_tag_content__field_descriptors[3 "", 3, PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_INT32, - offsetof(CartridgeTagContent, has_factoryid), - offsetof(CartridgeTagContent, factoryid), + PROTOBUF_C_TYPE_UINT32, + offsetof(CartridgeTagContent, has_inkfactoryid), + offsetof(CartridgeTagContent, inkfactoryid), NULL, NULL, 0, /* flags */ @@ -94,9 +94,9 @@ static const ProtobufCFieldDescriptor cartridge_tag_content__field_descriptors[3 "", 4, PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_INT32, - offsetof(CartridgeTagContent, has_fillingsystemid), - offsetof(CartridgeTagContent, fillingsystemid), + PROTOBUF_C_TYPE_UINT32, + offsetof(CartridgeTagContent, has_fillsysid), + offsetof(CartridgeTagContent, fillsysid), NULL, NULL, 0, /* flags */ @@ -130,9 +130,9 @@ static const ProtobufCFieldDescriptor cartridge_tag_content__field_descriptors[3 "", 7, PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_INT32, - offsetof(CartridgeTagContent, has_colorcategory), - offsetof(CartridgeTagContent, colorcategory), + PROTOBUF_C_TYPE_UINT32, + offsetof(CartridgeTagContent, has_inkcategory), + offsetof(CartridgeTagContent, inkcategory), NULL, NULL, 0, /* flags */ @@ -142,9 +142,9 @@ static const ProtobufCFieldDescriptor cartridge_tag_content__field_descriptors[3 "", 8, PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_INT32, - offsetof(CartridgeTagContent, has_colortyperevision), - offsetof(CartridgeTagContent, colortyperevision), + PROTOBUF_C_TYPE_UINT32, + offsetof(CartridgeTagContent, has_type_rev), + offsetof(CartridgeTagContent, type_rev), NULL, NULL, 0, /* flags */ @@ -154,7 +154,7 @@ static const ProtobufCFieldDescriptor cartridge_tag_content__field_descriptors[3 "", 9, PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_INT32, + PROTOBUF_C_TYPE_UINT32, offsetof(CartridgeTagContent, has_cartridgesize), offsetof(CartridgeTagContent, cartridgesize), NULL, @@ -166,9 +166,9 @@ static const ProtobufCFieldDescriptor cartridge_tag_content__field_descriptors[3 "", 10, PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_INT32, - offsetof(CartridgeTagContent, has_filledinkvolume), - offsetof(CartridgeTagContent, filledinkvolume), + PROTOBUF_C_TYPE_UINT32, + offsetof(CartridgeTagContent, has_filedinkvol), + offsetof(CartridgeTagContent, filedinkvol), NULL, NULL, 0, /* flags */ @@ -180,7 +180,7 @@ static const ProtobufCFieldDescriptor cartridge_tag_content__field_descriptors[3 PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_STRING, 0, /* quantifier_offset */ - offsetof(CartridgeTagContent, inkbatchnum), + offsetof(CartridgeTagContent, inkbatchno), NULL, NULL, 0, /* flags */ @@ -216,7 +216,7 @@ static const ProtobufCFieldDescriptor cartridge_tag_content__field_descriptors[3 PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_STRING, 0, /* quantifier_offset */ - offsetof(CartridgeTagContent, cartridgefillingdate), + offsetof(CartridgeTagContent, cartfilldate), NULL, NULL, 0, /* flags */ @@ -228,7 +228,7 @@ static const ProtobufCFieldDescriptor cartridge_tag_content__field_descriptors[3 PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_STRING, 0, /* quantifier_offset */ - offsetof(CartridgeTagContent, wastefilleddate), + offsetof(CartridgeTagContent, wastefilldate), NULL, NULL, 0, /* flags */ @@ -238,9 +238,9 @@ static const ProtobufCFieldDescriptor cartridge_tag_content__field_descriptors[3 "", 16, PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_INT32, - offsetof(CartridgeTagContent, has_plugincounter), - offsetof(CartridgeTagContent, plugincounter), + PROTOBUF_C_TYPE_UINT32, + offsetof(CartridgeTagContent, has_misc), + offsetof(CartridgeTagContent, misc), NULL, NULL, 0, /* flags */ @@ -251,8 +251,8 @@ static const ProtobufCFieldDescriptor cartridge_tag_content__field_descriptors[3 17, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_UINT32, - offsetof(CartridgeTagContent, has_misc), - offsetof(CartridgeTagContent, misc), + offsetof(CartridgeTagContent, has_plugincounter), + offsetof(CartridgeTagContent, plugincounter), NULL, NULL, 0, /* flags */ @@ -263,8 +263,8 @@ static const ProtobufCFieldDescriptor cartridge_tag_content__field_descriptors[3 18, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_BOOL, - offsetof(CartridgeTagContent, has_inkfill), - offsetof(CartridgeTagContent, inkfill), + offsetof(CartridgeTagContent, has_inkfillstatus), + offsetof(CartridgeTagContent, inkfillstatus), NULL, NULL, 0, /* flags */ @@ -275,8 +275,8 @@ static const ProtobufCFieldDescriptor cartridge_tag_content__field_descriptors[3 19, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_BOOL, - offsetof(CartridgeTagContent, has_inkused), - offsetof(CartridgeTagContent, inkused), + offsetof(CartridgeTagContent, has_inkusedstatus), + offsetof(CartridgeTagContent, inkusedstatus), NULL, NULL, 0, /* flags */ @@ -287,8 +287,8 @@ static const ProtobufCFieldDescriptor cartridge_tag_content__field_descriptors[3 20, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_BOOL, - offsetof(CartridgeTagContent, has_inkempty), - offsetof(CartridgeTagContent, inkempty), + offsetof(CartridgeTagContent, has_inkemptystatus), + offsetof(CartridgeTagContent, inkemptystatus), NULL, NULL, 0, /* flags */ @@ -299,8 +299,8 @@ static const ProtobufCFieldDescriptor cartridge_tag_content__field_descriptors[3 21, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_BOOL, - offsetof(CartridgeTagContent, has_wasteempty), - offsetof(CartridgeTagContent, wasteempty), + offsetof(CartridgeTagContent, has_wasteemptystatus), + offsetof(CartridgeTagContent, wasteemptystatus), NULL, NULL, 0, /* flags */ @@ -311,8 +311,8 @@ static const ProtobufCFieldDescriptor cartridge_tag_content__field_descriptors[3 22, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_BOOL, - offsetof(CartridgeTagContent, has_wastefilling), - offsetof(CartridgeTagContent, wastefilling), + offsetof(CartridgeTagContent, has_wastefillingstatus), + offsetof(CartridgeTagContent, wastefillingstatus), NULL, NULL, 0, /* flags */ @@ -323,8 +323,8 @@ static const ProtobufCFieldDescriptor cartridge_tag_content__field_descriptors[3 23, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_BOOL, - offsetof(CartridgeTagContent, has_wastefull), - offsetof(CartridgeTagContent, wastefull), + offsetof(CartridgeTagContent, has_wastefullstatus), + offsetof(CartridgeTagContent, wastefullstatus), NULL, NULL, 0, /* flags */ @@ -358,7 +358,7 @@ static const ProtobufCFieldDescriptor cartridge_tag_content__field_descriptors[3 "", 26, PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_INT32, + PROTOBUF_C_TYPE_UINT32, offsetof(CartridgeTagContent, has_wastecounter), offsetof(CartridgeTagContent, wastecounter), NULL, @@ -372,7 +372,7 @@ static const ProtobufCFieldDescriptor cartridge_tag_content__field_descriptors[3 PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_STRING, 0, /* quantifier_offset */ - offsetof(CartridgeTagContent, machineidinkused), + offsetof(CartridgeTagContent, machineidinl), NULL, NULL, 0, /* flags */ @@ -384,7 +384,7 @@ static const ProtobufCFieldDescriptor cartridge_tag_content__field_descriptors[3 PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_STRING, 0, /* quantifier_offset */ - offsetof(CartridgeTagContent, machineidwasteused), + offsetof(CartridgeTagContent, machineidwst), NULL, NULL, 0, /* flags */ @@ -394,6 +394,18 @@ static const ProtobufCFieldDescriptor cartridge_tag_content__field_descriptors[3 "", 29, PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(CartridgeTagContent, spare), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "", + 30, + PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_UINT32, offsetof(CartridgeTagContent, has_counter), offsetof(CartridgeTagContent, counter), @@ -404,7 +416,7 @@ static const ProtobufCFieldDescriptor cartridge_tag_content__field_descriptors[3 }, { "", - 30, + 31, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_BOOL, offsetof(CartridgeTagContent, has_tagvalid), @@ -416,7 +428,7 @@ static const ProtobufCFieldDescriptor cartridge_tag_content__field_descriptors[3 }, { "", - 31, + 32, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_STRING, 0, /* quantifier_offset */ @@ -428,7 +440,7 @@ static const ProtobufCFieldDescriptor cartridge_tag_content__field_descriptors[3 }, { "", - 32, + 33, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_UINT32, offsetof(CartridgeTagContent, has_checksum_crc16), @@ -441,42 +453,43 @@ static const ProtobufCFieldDescriptor cartridge_tag_content__field_descriptors[3 }; static const unsigned cartridge_tag_content__field_indices_by_name[] = { 23, /* field[23] = Blocked */ - 13, /* field[13] = CartridgeFillingDate */ + 13, /* field[13] = CartFillDate */ + 1, /* field[1] = CartSN */ 8, /* field[8] = CartridgeSize */ - 31, /* field[31] = Checksum_CRC16 */ - 6, /* field[6] = ColorCategory */ + 32, /* field[32] = Checksum_CRC16 */ 5, /* field[5] = ColorName */ - 7, /* field[7] = ColorTypeRevision */ - 28, /* field[28] = Counter */ - 2, /* field[2] = FactoryId */ + 29, /* field[29] = Counter */ 24, /* field[24] = Fail */ - 9, /* field[9] = FilledInkVolume */ - 3, /* field[3] = FillingSystemId */ - 30, /* field[30] = HashValue */ - 10, /* field[10] = InkBatchNum */ + 9, /* field[9] = FiledInkVol */ + 3, /* field[3] = FillSysID */ + 31, /* field[31] = HashValue */ + 10, /* field[10] = InkBatchNo */ + 6, /* field[6] = InkCategory */ 12, /* field[12] = InkEOLDate */ - 19, /* field[19] = InkEmpty */ + 19, /* field[19] = InkEmptyStatus */ + 2, /* field[2] = InkFactoryID */ + 17, /* field[17] = InkFillStatus */ 11, /* field[11] = InkMFGDate */ - 18, /* field[18] = InkUsed */ - 17, /* field[17] = Inkfill */ - 26, /* field[26] = MachineIdInkUsed */ - 27, /* field[27] = MachineIdWasteUsed */ - 16, /* field[16] = Misc */ - 15, /* field[15] = PlugInCounter */ - 1, /* field[1] = SerialNumber */ - 29, /* field[29] = TagValid */ - 0, /* field[0] = UniqueId */ + 18, /* field[18] = InkUsedStatus */ + 26, /* field[26] = MachineIdINL */ + 27, /* field[27] = MachineIdWST */ + 15, /* field[15] = Misc */ + 16, /* field[16] = PluginCounter */ + 28, /* field[28] = Spare */ + 0, /* field[0] = TagUniqueID */ + 30, /* field[30] = TagValid */ + 7, /* field[7] = Type_Rev */ 25, /* field[25] = WasteCounter */ - 20, /* field[20] = WasteEmpty */ - 14, /* field[14] = WasteFilledDate */ - 21, /* field[21] = WasteFilling */ - 22, /* field[22] = WasteFull */ + 20, /* field[20] = WasteEmptyStatus */ + 14, /* field[14] = WasteFillDate */ + 21, /* field[21] = WasteFillingStatus */ + 22, /* field[22] = WasteFullStatus */ 4, /* field[4] = WorkOrder */ }; static const ProtobufCIntRange cartridge_tag_content__number_ranges[1 + 1] = { { 1, 0 }, - { 0, 32 } + { 0, 33 } }; const ProtobufCMessageDescriptor cartridge_tag_content__descriptor = { @@ -486,7 +499,7 @@ const ProtobufCMessageDescriptor cartridge_tag_content__descriptor = "", "", sizeof(CartridgeTagContent), - 32, + 33, cartridge_tag_content__field_descriptors, cartridge_tag_content__field_indices_by_name, 1, cartridge_tag_content__number_ranges, diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/CartridgeTagContent.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/CartridgeTagContent.pb-c.h index 04d33a5cc..be2a97b4d 100644 --- a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/CartridgeTagContent.pb-c.h +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/CartridgeTagContent.pb-c.h @@ -26,51 +26,52 @@ typedef struct _CartridgeTagContent CartridgeTagContent; struct _CartridgeTagContent { ProtobufCMessage base; - char *uniqueid; - char *serialnumber; - protobuf_c_boolean has_factoryid; - int32_t factoryid; - protobuf_c_boolean has_fillingsystemid; - int32_t fillingsystemid; + char *taguniqueid; + char *cartsn; + protobuf_c_boolean has_inkfactoryid; + uint32_t inkfactoryid; + protobuf_c_boolean has_fillsysid; + uint32_t fillsysid; char *workorder; char *colorname; - protobuf_c_boolean has_colorcategory; - int32_t colorcategory; - protobuf_c_boolean has_colortyperevision; - int32_t colortyperevision; + protobuf_c_boolean has_inkcategory; + uint32_t inkcategory; + protobuf_c_boolean has_type_rev; + uint32_t type_rev; protobuf_c_boolean has_cartridgesize; - int32_t cartridgesize; - protobuf_c_boolean has_filledinkvolume; - int32_t filledinkvolume; - char *inkbatchnum; + uint32_t cartridgesize; + protobuf_c_boolean has_filedinkvol; + uint32_t filedinkvol; + char *inkbatchno; char *inkmfgdate; char *inkeoldate; - char *cartridgefillingdate; - char *wastefilleddate; - protobuf_c_boolean has_plugincounter; - int32_t plugincounter; + char *cartfilldate; + char *wastefilldate; protobuf_c_boolean has_misc; uint32_t misc; - protobuf_c_boolean has_inkfill; - protobuf_c_boolean inkfill; - protobuf_c_boolean has_inkused; - protobuf_c_boolean inkused; - protobuf_c_boolean has_inkempty; - protobuf_c_boolean inkempty; - protobuf_c_boolean has_wasteempty; - protobuf_c_boolean wasteempty; - protobuf_c_boolean has_wastefilling; - protobuf_c_boolean wastefilling; - protobuf_c_boolean has_wastefull; - protobuf_c_boolean wastefull; + protobuf_c_boolean has_plugincounter; + uint32_t plugincounter; + protobuf_c_boolean has_inkfillstatus; + protobuf_c_boolean inkfillstatus; + protobuf_c_boolean has_inkusedstatus; + protobuf_c_boolean inkusedstatus; + protobuf_c_boolean has_inkemptystatus; + protobuf_c_boolean inkemptystatus; + protobuf_c_boolean has_wasteemptystatus; + protobuf_c_boolean wasteemptystatus; + protobuf_c_boolean has_wastefillingstatus; + protobuf_c_boolean wastefillingstatus; + protobuf_c_boolean has_wastefullstatus; + protobuf_c_boolean wastefullstatus; protobuf_c_boolean has_blocked; protobuf_c_boolean blocked; protobuf_c_boolean has_fail; protobuf_c_boolean fail; protobuf_c_boolean has_wastecounter; - int32_t wastecounter; - char *machineidinkused; - char *machineidwasteused; + uint32_t wastecounter; + char *machineidinl; + char *machineidwst; + char *spare; protobuf_c_boolean has_counter; uint32_t counter; protobuf_c_boolean has_tagvalid; @@ -81,7 +82,7 @@ struct _CartridgeTagContent }; #define CARTRIDGE_TAG_CONTENT__INIT \ { PROTOBUF_C_MESSAGE_INIT (&cartridge_tag_content__descriptor) \ - , NULL, NULL, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, NULL, 0, 0 } + , NULL, NULL, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, NULL, 0, 0, 0, 0, NULL, 0, 0 } /* CartridgeTagContent methods */ diff --git a/Software/Embedded_SW/Embedded/Drivers/Valves/Valve.c b/Software/Embedded_SW/Embedded/Drivers/Valves/Valve.c index ea5fd159c..2ae3da453 100644 --- a/Software/Embedded_SW/Embedded/Drivers/Valves/Valve.c +++ b/Software/Embedded_SW/Embedded/Drivers/Valves/Valve.c @@ -114,12 +114,12 @@ bool IgnoreMidTank = false; bool MidTankMitigation = false; int MidTankMitigationOn = 20,MidTankMitigationOff = 10; -uint32_t MidtankMitigationControlId[MAX_SYSTEM_DISPENSERS*2] = {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF}; -uint32_t MidtankMitigationCounter[MAX_SYSTEM_DISPENSERS*2]; +uint32_t MidtankMitigationControlId[NUM_OF_VALVES] = {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF}; +uint16_t MidtankMitigationCounter[NUM_OF_VALVES]; uint32_t ValveCallback(uint32_t deviceID, uint32_t ReadValue) { - int Valve_Id = deviceID%MAX_SYSTEM_DISPENSERS; + int Valve_Id = deviceID; MidtankMitigationCounter[deviceID]++; if (MidtankMitigationCounter[deviceID] > MidTankMitigationOn ) @@ -414,7 +414,6 @@ void EnableDisableAllDispensersValves(bool EnableOrDisable ) void Valve_Set(Valves_t Valve_Id, bool Direction) { #ifndef EVALUATION_BOARD - int deviceId; if ((Valve_Id>=VALVE_2W_MID_AIR_8)&&(Valve_Id<=VALVE_2W_CART_MID_1)) { if (IgnoreMidTank == true) @@ -424,20 +423,19 @@ void Valve_Set(Valves_t Valve_Id, bool Direction) } if (MidTankMitigation == true) { - deviceId = Valve_Id - VALVE_2W_MID_AIR_8; - Report("Mid Tank Valve command mitigation",__FILE__,Valve_Id,(int)deviceId,RpWarning,Direction,0); + Report("Mid Tank Valve command mitigation",__FILE__,Valve_Id,(int)Valve_Id,RpWarning,Direction,0); if (Direction == true) { //start s 2 seconds control, then according to the set values - MidtankMitigationCounter[deviceId] = MidTankMitigationOn+1; - MidtankMitigationControlId[deviceId] = AddControlCallback("Valve mitigation", ValveCallback, 2, TemplateDataReadCBFunction,deviceId, Direction, 0 ); + MidtankMitigationCounter[Valve_Id] = MidTankMitigationOn+1; + MidtankMitigationControlId[Valve_Id] = AddControlCallback("Valve mitigation", ValveCallback, 2, TemplateDataReadCBFunction,Valve_Id, Direction, 0 ); } else { //cancel the control if (Valve3WayControlId[_ValveId] != 0xFF) - if (RemoveControlCallback(MidtankMitigationControlId[deviceId], ValveCallback )!=OK) - Report("Remove Control Failed.",__FILE__,__LINE__,(int)deviceId,RpError,(int)Direction,0); - MidtankMitigationControlId[deviceId] = 0xFF; + if (RemoveControlCallback(MidtankMitigationControlId[Valve_Id], ValveCallback )!=OK) + Report("Remove Control Failed.",__FILE__,__LINE__,(int)Valve_Id,RpError,(int)Direction,0); + MidtankMitigationControlId[Valve_Id] = 0xFF; } } } diff --git a/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c b/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c index 4ff2e546c..6f5b5fe23 100644 --- a/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c +++ b/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c @@ -345,14 +345,14 @@ uint32_t EmbeddedParametersInit(void) } } - /* if (EmbeddedParameters->n_generalparameters >= 6) + if (EmbeddedParameters->n_generalparameters >= 6) { IDS_Dispenser_SetBackLashValues(EmbeddedParameters->initialdispenserpressure, EmbeddedParameters->initialdispensertimeout, EmbeddedParameters->initialdispensertimelag,EmbeddedParameters->generalparameters[5]); } else { IDS_Dispenser_SetBackLashValues(EmbeddedParameters->initialdispenserpressure, EmbeddedParameters->initialdispensertimeout, EmbeddedParameters->initialdispensertimelag,1000); - }*/ + } IDS_Dispenser_SetTimeOutValues(EmbeddedParameters->closevalvetimeout, EmbeddedParameters->openvalvetimeout); IDS_Dispenser_SetPrepareValues(EmbeddedParameters->dispenserbuildpressurespeed, EmbeddedParameters->dispenserbuildpressurelimit, EmbeddedParameters->dispenserbuildpressuretimeout, EmbeddedParameters->dispenserbuildpressurelag); diff --git a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c index 0e2cd4241..91433744e 100644 --- a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c +++ b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c @@ -299,6 +299,7 @@ int HeaterDisasterCounter[HEATER_TYPE_MAX_HEATERS] = {0,0,0,0,0,0,0,0,0,0,0,0,0, /******************** FUNCTIONS ********************************************/ uint32_t HeaterMaxTempCBFunction(uint32_t IfIndex, uint32_t readValue); +uint32_t HeaterBlowerMaxTempCBFunction(uint32_t IfIndex, uint32_t readValue); uint32_t DcHeaterMaxTempCBFunction(uint32_t IfIndex, uint32_t readValue); uint32_t HeaterControlCBFunction(uint32_t deviceID, uint32_t readValue); uint32_t DCHeaterControlCBFunction(uint32_t IfIndex, uint32_t readValue); @@ -898,8 +899,16 @@ int PrepareDCHeater(int HeaterId, uint32_t Frequency, uint32_t SetTemperatue) } //ReportWithPackageFilter(HeatersFilter,"PrepareHeater Read", __FILE__,HeaterId, SetTemperatue, RpWarning,HeaterPreviousRead[HeaterId], 0); - if (ControlIdtoMaxHeaterId [HeaterId] == 0xFF) - ControlIdtoMaxHeaterId [HeaterId] = AddControlCallback("DcHeatersMax", DcHeaterMaxTempCBFunction, eOneSecond,MillisecGetTemperatures,(IfTypeHeaters*0x100+HeaterId),HeaterId2PT100Id[HeaterId],0); + if ((HeaterId != HEATER_TYPE__HeadCoverHeater1)&&(HeaterId != HEATER_TYPE__HeadCoverHeater2)) //tunnel Heaters + { + if (ControlIdtoMaxHeaterId [HeaterId] == 0xFF) + ControlIdtoMaxHeaterId [HeaterId] = AddControlCallback("DcHeatersMax", DcHeaterMaxTempCBFunction, eOneSecond,MillisecGetTemperatures,(IfTypeHeaters*0x100+HeaterId),HeaterId2PT100Id[HeaterId],0); + } + else + { + if (ControlIdtoMaxHeaterId [HeaterId] == 0xFF) + ControlIdtoMaxHeaterId [HeaterId] = AddControlCallback("DcHeatersMax", HeaterBlowerMaxTempCBFunction, eOneSecond,MillisecGetTemperatures,(IfTypeHeaters*0x100+HeaterId),HeaterId2PT100Id[HeaterId],0); + } return OK; } @@ -1101,41 +1110,40 @@ uint32_t HeaterMaxTempCBFunction(uint32_t IfIndex, uint32_t readValue) } return ERROR; } -uint32_t DcHeaterMaxTempCBFunction(uint32_t IfIndex, uint32_t readValue) +uint32_t HeaterBlowerMaxTempCBFunction(uint32_t IfIndex, uint32_t readValue) { - int index=HEATER_TYPE_MAX_HEATERS; uint32_t BlowerPt100Read = 0; + int index=HEATER_TYPE_MAX_HEATERS; + int32_t MaxreadValue; + if (IfIndex>>8 != IfTypeHeaters) { ReportWithPackageFilter(HeatersFilter, "Wrong Interface type",__FILE__,__LINE__,IfIndex,RpError, 0,0); return 0xFFFFFFFF; } + if (Head_Type != HEAD_TYPE_ARC) + { + ReportWithPackageFilter(HeatersFilter, "Wrong head type",__FILE__,__LINE__,Head_Type,RpError, 0,0); + return 0xFFFFFFFF; + } index = IfIndex&0xFF; + if ((index != HEATER_TYPE__HeadCoverHeater1)&&(index != HEATER_TYPE__HeadCoverHeater2)) //AC Heaters + { + ReportWithPackageFilter(HeatersFilter, "Wrong Interface ",__FILE__,__LINE__,IfIndex,RpError, index,0); + return 0xFFFFFFFF; + } //int32_t readValue = MillisecGetTemperatures(HeaterId2PT100Id[index]); - if (HeaterControl[index].sensormaxvalue == 0) - return OK; -#ifndef USE_TUNNEL_PT100 - if (Head_Type == HEAD_TYPE_ARC) { - if (index == HEATER_TYPE__HeadCoverHeater1) { - BlowerPt100Read = MillisecGetTemperatures(HEAD_PT100_AIR_HEATER_2_0X8C_1); - } - if (index == HEATER_TYPE__HeadCoverHeater2) { - BlowerPt100Read = MillisecGetTemperatures(HEAD_PT100_AIR_HEATER_1_0X8C_0); - } + if (Head_Type == HEAD_TYPE_ARC) { + if (index == HEATER_TYPE__HeadCoverHeater1) { + BlowerPt100Read = MillisecGetTemperatures(HEAD_PT100_AIR_HEATER_2_0X8C_1); } -#else - if (Head_Type == HEAD_TYPE_ARC) { - if (index == HEATER_TYPE__HeadCoverHeater1) { - BlowerPt100Read = MillisecGetTemperatures(HEAD_PT100_ZONE_11_0X8A_0); - } - if (index == HEATER_TYPE__HeadCoverHeater2) { - BlowerPt100Read = MillisecGetTemperatures(HEAD_PT100_ZONE_12_0X8A_1); - } + if (index == HEATER_TYPE__HeadCoverHeater2) { + BlowerPt100Read = MillisecGetTemperatures(HEAD_PT100_AIR_HEATER_1_0X8C_0); } -#endif + } - if ((HeaterPreviousRead[index] >= HeaterControl[index].sensormaxvalue) || (BlowerPt100Read > 25000)) + if ((BlowerPt100Read >= HeaterControl[index].sensormaxvalue) || (BlowerPt100Read > 25000)) { if(OverHeatCounter[index]++ >= Overheat_Count_Limit) { @@ -1165,23 +1173,55 @@ uint32_t DcHeaterMaxTempCBFunction(uint32_t IfIndex, uint32_t readValue) } } } - if (index == HEATER_TYPE__DryerAirHeater) + if (index == HEATER_TYPE__HeadCoverHeater1) { - DeActivateHeater(HEATER_TYPE__DryerMainHeater); - HeaterRecalculateSharedHeatersParams(HEATER_TYPE__DryerMainHeater,0); - DeActivateHeater(HEATER_TYPE__DryerSecondaryHeater); - HeaterRecalculateSharedHeatersParams(HEATER_TYPE__DryerSecondaryHeater,0); + DeActivateHeater(HEATER_TYPE__HeadCoverHeater1); + HeaterRecalculateHeaterParams(HEATER_TYPE__HeadCoverHeater1,0); } else { - DeActivateHeater(index); - HeaterRecalculateHeaterParams(index, 0); + DeActivateHeater(HEATER_TYPE__HeadCoverHeater2); + HeaterRecalculateHeaterParams(HEATER_TYPE__HeadCoverHeater2,0); } HeaterMaxTempFlag[index] = true; //ReportWithPackageFilter(HeatersFilter,(MinreadValue/100), "Heater Over the max temperature, turned off"); return OK; } - else if ((HeaterPreviousRead[index]) < (HeaterControl[index].sensorminvalue)) + if (MaxreadValue <= (HeaterControl[index].sensormaxvalue-HeaterControl[index].sensorminvalue)) //was MinreadValue + { + if (HeaterControl[index].sensorminvalue > 0) + { + if (HeaterMaxTempFlag[index] == true) + { + /* ActivateHeater(HEATER_TYPE__DryerMainHeater); + if (HeaterReady[HEATER_TYPE__DryerAirHeater]==false) + { + ActivateHeater(HEATER_TYPE__DryerSecondaryHeater); + }*/ + //ReportWithPackageFilter(HeatersFilter, "Heater Cooled Off max temperature, turned on",__FILE__,__LINE__,(MinreadValue/100),RpError, 0,0); + } + HeaterMaxTempFlag[index] = false; + } + return OK; + } + + + return ERROR; +} +uint32_t DcHeaterMaxTempCBFunction(uint32_t IfIndex, uint32_t readValue) +{ + int index=HEATER_TYPE_MAX_HEATERS; + + if (IfIndex>>8 != IfTypeHeaters) + { + ReportWithPackageFilter(HeatersFilter, "Wrong Interface type",__FILE__,__LINE__,IfIndex,RpError, 0,0); + return 0xFFFFFFFF; + } + index = IfIndex&0xFF; + //int32_t readValue = MillisecGetTemperatures(HeaterId2PT100Id[index]); + if (HeaterControl[index].sensormaxvalue == 0) + return OK; + if ((HeaterPreviousRead[index]) < (HeaterControl[index].sensorminvalue)) { if (HeaterReady[index]==true) { diff --git a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_maint.c b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_maint.c index 754374875..c55f10277 100644 --- a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_maint.c +++ b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_maint.c @@ -105,9 +105,9 @@ void IDS_Dispenser_SetAutoHoming_Config(AutoHoming_Config_enum Config) void IDS_Dispenser_SetBackLashValues(double initialdispenserpressure, uint32_t initialdispensertimeout, uint32_t initialdispensertimelag, uint32_t initialdispenserspeed) { - if (initialdispenserpressure>2) + //if (initialdispenserpressure>2) InitialDispenserPressure = initialdispenserpressure; - if (initialdispensertimeout>70000) + //if (initialdispensertimeout>70000) InitialDispenserTimeout = initialdispensertimeout; InitialDispenserTimeLag = initialdispensertimelag; InitialDispenserSpeed = initialdispenserspeed; diff --git a/Software/Embedded_SW/Embedded/Modules/IFS/ifs.c b/Software/Embedded_SW/Embedded/Modules/IFS/ifs.c index f822c869c..747df1a61 100644 --- a/Software/Embedded_SW/Embedded/Modules/IFS/ifs.c +++ b/Software/Embedded_SW/Embedded/Modules/IFS/ifs.c @@ -305,7 +305,7 @@ void midTankStateMachine(void) } midTankCapacity = Get_MidTank_Pressure_Sensor(midTankCartColor); - if (midTankCapacity > MidTankEmptyLimit) + if ((midTankCapacity > MidTankEmptyLimit)&&(midTankCartColor!=MIDTANK_8))//enable lubricant filling in two stages { Pannel_Leds(CART_1, MODE_ON); cart1.color = fastBILNK; diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c b/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c index d5c186893..6edc5b3f2 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c @@ -1109,6 +1109,8 @@ uint32_t ThreadLoadButton(THREAD_LOAD_STAGES_ENUM ReadValue) } Report("ThreadLoadButton",__FILE__,__LINE__,LoadStages,RpMessage,ReadValue,0); Report("ThreadLoadButton params",__FILE__,LoadStatus,TryAgain,RpMessage,SecondTry,0); + if (LoadStages == THREAD_LOAD_INITIAL_TENSION) //on this satge we should wait for user call + MessageState = 2; ThreadLoadingReport(); if (LoadStatus == ERROR) { @@ -1407,8 +1409,6 @@ uint32_t ThreadLoadingReport(void) if (ThreadLoadingToken[0] == 0) return OK; - if (LoadStages == THREAD_LOAD_INIT) - return OK; if (MessageState == 0) { diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c index 2b6492dab..f4d34284d 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c @@ -273,7 +273,8 @@ uint32_t Winder_PrepareStage2(uint32_t deviceID, uint32_t ReadValue) uint32_t Winder_ScrewAtOffsetCallback(uint32_t MotorId, uint32_t BusyFlag) { //MotorSetMaxSpeed (HARDWARE_MOTOR_TYPE__MOTO_SCREW,temp_MaxFrequency); - Screw_wait_counter--; + if (Screw_wait_counter) + Screw_wait_counter--; MotorStop (MotorId,Soft_Hiz); //per L6470 errata between mov and run commands /*#ifdef FOUR_WINDERS diff --git a/Software/PMR/Messages/Diagnostics/CartridgeTagContent.proto b/Software/PMR/Messages/Diagnostics/CartridgeTagContent.proto index 39acbc7af..37931ae0c 100644 --- a/Software/PMR/Messages/Diagnostics/CartridgeTagContent.proto +++ b/Software/PMR/Messages/Diagnostics/CartridgeTagContent.proto @@ -5,37 +5,37 @@ option java_package = "com.twine.tango.pmr.diagnostics"; message CartridgeTagContent { - string UniqueId = 1; - string SerialNumber = 2; - int32 FactoryId = 3; - int32 FillingSystemId = 4; - string WorkOrder = 5; - string ColorName = 6; - int32 ColorCategory = 7; - int32 ColorTypeRevision = 8; - int32 CartridgeSize = 9; - int32 FilledInkVolume = 10; - string InkBatchNum = 11; - string InkMFGDate = 12; - string InkEOLDate = 13; - string CartridgeFillingDate = 14; - string WasteFilledDate = 15; - int32 PlugInCounter = 16; - uint32 Misc = 17; - bool Inkfill = 18; - bool InkUsed = 19; - bool InkEmpty = 20; - bool WasteEmpty = 21; - bool WasteFilling = 22; - bool WasteFull = 23; - bool Blocked = 24; - bool Fail = 25; - int32 WasteCounter = 26; - string MachineIdInkUsed = 27; - string MachineIdWasteUsed = 28; - uint32 Counter = 29; - bool TagValid = 30; - string HashValue = 31; - uint32 Checksum_CRC16 = 32; - + string TagUniqueID = 1; //RFID Tag unique ID + string CartSN = 2; //Cartridge serial number + uint32 InkFactoryID = 3; //Ink factory ID + uint32 FillSysID = 4; //Filling system ID number + string WorkOrder = 5; //Color description / ID + string ColorName = 6; //Color description / ID + uint32 InkCategory = 7; //Ink category (TBD) + uint32 Type_Rev = 8; //TBD – can be formulation # + uint32 CartridgeSize = 9; //Size in cc + uint32 FiledInkVol = 10; //Size in cc + string InkBatchNo = 11; //MFG batch No’ + string InkMFGDate = 12; //Date Ink was manufactured (20L container bar-code) + string InkEOLDate = 13; //Ink end of life date + string CartFillDate = 14; //Date cartridge was filled with ink (CFS) + string WasteFillDate = 15;//Date cartridge was filled with waste (Machine) + uint32 Misc = 16; + uint32 PluginCounter = 17; //Number of times cartridge was plugged in INK Slot + bool InkFillStatus = 18; //State indicator - successful state change when starting to fill mid. tank + bool InkUsedStatus = 19; + bool InkEmptyStatus = 20; + bool WasteEmptyStatus = 21; + bool WasteFillingStatus = 22; + bool WasteFullStatus = 23; + bool Blocked = 24; + bool Fail = 25; + uint32 WasteCounter = 26; + string MachineIdINL = 27; + string MachineIdWST = 28; + string Spare = 29; + uint32 Counter = 30; + bool TagValid = 31; + string HashValue = 32; + uint32 Checksum_CRC16 = 33; } \ No newline at end of file -- cgit v1.3.1 From a20d25bb885b3ec46d63bda7263fd98faa4095c2 Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Wed, 7 Oct 2020 21:40:34 +0300 Subject: winder calibration from main EEPROM (for #3782, #3761). waste prepare (#2995) increased suction after job (#2994) --- .../WHS_Card/D_Max5805_ADC_Blower/WHS_Blower.c | 16 ++++++++ .../WHS_Card/D_Max5805_ADC_Blower/WHS_Blower.h | 2 + .../Embedded/Drivers/flash_ram/MCU_E2Prom.h | 2 +- .../Embedded/Modules/AlarmHandling/AlarmHandling.c | 2 +- .../Embedded/Modules/Stubs_Handler/Progress.c | 9 ++++- .../Embedded/Modules/Thread/Thread_Winder.c | 11 +++++- .../Embedded_SW/Embedded/Modules/Waste/Waste_ex.h | 1 + .../Embedded/Modules/Waste/Waste_maint.c | 44 +++++++++++++++++++++- .../Embedded/StateMachines/Printing/JobSTM.c | 32 +++++++--------- 9 files changed, 94 insertions(+), 25 deletions(-) (limited to 'Software/Embedded_SW/Embedded/Modules/Thread') diff --git a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/WHS_Card/D_Max5805_ADC_Blower/WHS_Blower.c b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/WHS_Card/D_Max5805_ADC_Blower/WHS_Blower.c index 764ef0d44..9e626ec7f 100644 --- a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/WHS_Card/D_Max5805_ADC_Blower/WHS_Blower.c +++ b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/WHS_Card/D_Max5805_ADC_Blower/WHS_Blower.c @@ -391,6 +391,8 @@ bool IFS_Clearing_Suction = false; bool IFS_Clearing_SuctionWaiting = false; int midtank_cleared = NUM_OF_MIDTANKS; +bool JobEndSuction = false; + void WHS_Set_IFS_Clearing_Suction (int midtank) { if (JobIsActive()) @@ -405,6 +407,12 @@ void WHS_Set_IFS_Clearing_Suction (int midtank) } Report("------------ WHS_Set_IFS_Clearing_Suction :-----------------", __FILE__,__LINE__, (int) IFS_Clearing_Suction, RpMessage, (int)JobIsActive(), 0); } +#define JobEndSuctionTime 30 +void WHS_Set_JobEndSuction (void) +{ + JobEndSuction = true; + Report("------------ WHS_Set_JobEndSuction :-----------------", __FILE__,__LINE__, (int) JobEndSuction, RpMessage, (int)JobIsActive(), 0); +} #define MAX_ALLOWED_BLOWER_VOLTAGE 4300 #define MIN_ALLOWED_BLOWER_VOLTAGE 2400 @@ -482,6 +490,14 @@ bool WHS_Set_Blower_Control_Closed_Loop(double Q_value) } } + if (JobEndSuction == true) + { + JobEndSuction = false; + Report("------------ Job end Clearing Suction -----------------", __FILE__,__LINE__, (int)4000, RpMessage, (int)JobEndSuctionTime, 0); + Control_Voltage_To_Blower(4000); + close_loop_time = JobEndSuctionTime; + return OK; + } volt = getBlowerState(); WHS_Pid_Testing_Func(Q_value,current_dying_head_flow_Q); //close_loop_time = 1; diff --git a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/WHS_Card/D_Max5805_ADC_Blower/WHS_Blower.h b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/WHS_Card/D_Max5805_ADC_Blower/WHS_Blower.h index f5bc52858..3033d6d06 100644 --- a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/WHS_Card/D_Max5805_ADC_Blower/WHS_Blower.h +++ b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/WHS_Card/D_Max5805_ADC_Blower/WHS_Blower.h @@ -28,6 +28,8 @@ double get_average_Q(WHS_Flow_Meter ORF_id); bool WHS_Set_Blower_Control_Closed_Loop(double Q_value); void WHS_Start_Blower_Control_Closed_Loop (void); void WHS_Set_IFS_Clearing_Suction (int midtank); +void WHS_Set_JobEndSuction (void); + double WHS_Get_Blower_Control_Closed_Loop_SetPoint(void); void WHS_Set_SetPoint_Q_value(double value); void WHS_enable_control_loop(bool value); diff --git a/Software/Embedded_SW/Embedded/Drivers/flash_ram/MCU_E2Prom.h b/Software/Embedded_SW/Embedded/Drivers/flash_ram/MCU_E2Prom.h index bb171dda4..12598ed07 100644 --- a/Software/Embedded_SW/Embedded/Drivers/flash_ram/MCU_E2Prom.h +++ b/Software/Embedded_SW/Embedded/Drivers/flash_ram/MCU_E2Prom.h @@ -33,7 +33,7 @@ typedef enum { EEPROM_STORAGE_MIDTANK_8_B, //EEPROM_STORAGE_SERIAL_NUM, //EEPROM_STORAGE_MAC_ADDR, - EEPROM_STORAGE_DRYER_BACKLASH, + EEPROM_STORAGE_WINDER_CALIBRATION, EEPROM_STORAGE_EMBEDDED_VERSION, EEPROM_ALARM_SUPPORT, EEPROM_ORIFICE1_ZERO_VALUE, diff --git a/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c b/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c index ca6c4d51f..01e3533d6 100644 --- a/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c +++ b/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c @@ -972,7 +972,7 @@ JobEndReasonEnum AlarmHandlingPrepareJob(void *CurrentJob) } if (Configured[Module_Waste]) { - FoundReason = Waste_Prepare(); + FoundReason = Waste_CheckState(); } if ((AlarmState[Alarm_i].Status == true)&&(FoundReason == JOB_OK)) { diff --git a/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Progress.c b/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Progress.c index e4a573e7b..a81cfff52 100644 --- a/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Progress.c +++ b/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Progress.c @@ -1041,7 +1041,6 @@ void Stub_ProgressRequest(MessageContainer* requestContainer) response.progress = (double)MCU_E2PromProgram(EEPROM_STORAGE_DRYER_CYCLES,request->delay); response.has_progress = true; } - else if(request->amount == 0xB3) //fast refresh for pressure { @@ -1207,6 +1206,14 @@ void Stub_ProgressRequest(MessageContainer* requestContainer) response.has_progress = true; } else + if(request->amount == 0xB20) //Set loading arm cycles + { + LOG_ERROR(request->delay,"Set winding calibration data"); + + response.progress = (double)MCU_E2PromProgram(EEPROM_STORAGE_WINDER_CALIBRATION,request->delay); + response.has_progress = true; + } + else if(request->amount == 0xC3) //suspend I2C task { if (request->delay == 0) diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c index f4d34284d..4ec45c5b8 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c @@ -17,7 +17,7 @@ #include "Common/report/report.h" #include "drivers/FPGA/FPGA.h" - +#include "drivers/Flash_ram/MCU_E2Prom.h" #include "drivers/FPGA/FPGA_SPI_Comm.h" #include "drivers/FPGA/FPGA_GPIO/FPGA_GPIO.h" @@ -102,15 +102,22 @@ char ScrewStr[150]; uint32_t InternalWindingConfigMessage(JobSpool* request) { uint32_t status = PASSED; + int limitswitchstartpointoffset = 0; InternalWinderCfg.segmentoffsetpulses = request->segmentoffsetpulses; InternalWinderCfg.spoolbackingrate = request->backingrate; InternalWinderCfg.startoffsetpulses = request->startoffsetpulses; if (request->has_limitswitchstartpointoffset) { - InternalWinderCfg.startoffsetpulses += request->limitswitchstartpointoffset; + //InternalWinderCfg.startoffsetpulses += request->limitswitchstartpointoffset; Report("limit switch start point offset",__FILE__,__LINE__,(int)(request->startoffsetpulses),RpWarning,(int)(request->limitswitchstartpointoffset), 0); } + status |= MCU_E2PromRead(EEPROM_STORAGE_WINDER_CALIBRATION,&limitswitchstartpointoffset); + if ((status!= OK )||(limitswitchstartpointoffset == 0xFFFF)) + limitswitchstartpointoffset = 0; + Report("limit switch start point offset",__FILE__,(int)(request->startoffsetpulses),(int)(limitswitchstartpointoffset),RpWarning,status, 0); + InternalWinderCfg.startoffsetpulses += limitswitchstartpointoffset; + InternalWinderCfg.SpoolBottomBackingRate = request->bottombackingrate; InternalWinderCfg.NumberOfRotationPerPassage = 3.1415926*3;//request->rotationsperpassage; if (request->rotationsperpassage > 6.1) diff --git a/Software/Embedded_SW/Embedded/Modules/Waste/Waste_ex.h b/Software/Embedded_SW/Embedded/Modules/Waste/Waste_ex.h index 996191b63..0a7534635 100644 --- a/Software/Embedded_SW/Embedded/Modules/Waste/Waste_ex.h +++ b/Software/Embedded_SW/Embedded/Modules/Waste/Waste_ex.h @@ -44,6 +44,7 @@ bool WHS_IsContainerFull(); bool WHS_WasteCartridgeLowerPresent(); bool WHS_WasteCartridgeMiddlePresent(); bool WHS_IsEmptying(); +uint32_t Waste_CheckState(void); uint32_t Waste_Prepare(void); bool WHS_IsVocPpmOverAlarmLimit(); diff --git a/Software/Embedded_SW/Embedded/Modules/Waste/Waste_maint.c b/Software/Embedded_SW/Embedded/Modules/Waste/Waste_maint.c index 28a5720ab..fa89164d3 100644 --- a/Software/Embedded_SW/Embedded/Modules/Waste/Waste_maint.c +++ b/Software/Embedded_SW/Embedded/Modules/Waste/Waste_maint.c @@ -19,6 +19,7 @@ #include "CartridgeValidationRequest.pb-c.h" #include "CartridgeValidationResponse.pb-c.h" #include "Modules/General/buttons.h" +#include "modules/General/process.h" #include "Modules/IFS/ifs.h" #include #include @@ -501,7 +502,7 @@ void Waste_StateMachine(void) break; } } -uint32_t Waste_Prepare(void) +uint32_t Waste_CheckState(void) { //check if the waste is ready to run - waste level not above overflow level and no cartridge in the slots if (wasteLevel > wasteLevelOverflow) @@ -528,6 +529,45 @@ uint32_t Waste_Prepare(void) return JOB_WASTE_HANDLING_PROBLEM; } } +bool WHS_FlowReady = false,HeadIn_FlowReady = false,HeadOut_FlowReady = false; +uint32_t WasteReadyControlId = 0xFF; +uint32_t Waste_PrepareCallbak(uint32_t IfIndex, uint32_t ReadValue) +{ + bool ready = false, headready = false,whsready = false; + double HeadFlow = GetWHSAirFlow(HEAD_FLOW_METER); + double HeadIn_Flow = PressureSensorGetPressure(HEAD_PT100_ZONE_5_0X84_0); + double HeadOut_Flow = PressureSensorGetPressure(HEAD_PT100_ZONE_7_0X86_0); + if ((HeadFlow<(headairflow*1.07))&&(HeadFlow>(headairflow*0.93))) + WHS_FlowReady = true; + if ((HeadIn_FlowReady<(headBlowersFlow[0]*1.07))&&(HeadIn_FlowReady>(headBlowersFlow[0]*0.93))) + HeadIn_FlowReady = true; + if ((HeadOut_Flow<(headBlowersFlow[1]*1.07))&&(HeadOut_Flow>(headBlowersFlow[1]*0.93))) + HeadOut_FlowReady = true; + if (Head_Type Date: Thu, 8 Oct 2020 11:01:57 +0300 Subject: remove compilation warnings --- Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA.c | 1 - .../I2C_Communication/WHS_Card/D_MAX11614_ADC/WHS_MAX11614_A2D.c | 2 -- .../I2C_Communication/WHS_Card/D_Max5805_ADC_Blower/WHS_Blower.c | 3 +-- .../Embedded_SW/Embedded/Modules/Diagnostics/DiagnosticsHoming.c | 1 - Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c | 7 ++++--- Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c | 1 - Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c | 3 +-- Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c | 4 +++- Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c | 6 ++---- Software/Embedded_SW/Embedded/Modules/Waste/Waste_maint.c | 1 - .../Embedded_SW/Embedded/StateMachines/Initialization/PowerIdle.c | 4 ++-- .../Embedded/StateMachines/Initialization/PowerOffSequence.c | 4 ++-- 12 files changed, 15 insertions(+), 22 deletions(-) (limited to 'Software/Embedded_SW/Embedded/Modules/Thread') diff --git a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA.c b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA.c index 21056e162..95651eba2 100644 --- a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA.c +++ b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA.c @@ -434,7 +434,6 @@ uint32_t Read_Speed_Sensor_TypeII()//must be delay between Set_Speed_Sensor_Type temp1/=F1_Prescaler1_reg6; Speed_Hz = temp1; #endif - #warning change the speed from Hz to Cm/Sec return Speed_Hz; } diff --git a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/WHS_Card/D_MAX11614_ADC/WHS_MAX11614_A2D.c b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/WHS_Card/D_MAX11614_ADC/WHS_MAX11614_A2D.c index f7253a2e2..fff11f493 100644 --- a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/WHS_Card/D_MAX11614_ADC/WHS_MAX11614_A2D.c +++ b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/WHS_Card/D_MAX11614_ADC/WHS_MAX11614_A2D.c @@ -396,8 +396,6 @@ double GetWHSAirFlow(uint8_t OR_Id) //------------------------------ waste volume measurement ------------------------------ -#warning need to update low and high limits and to read the eeprom on the initialization - double DefaultCoefficient = 10.5;//Coefficient is 10.5mV/mm for TI (not water). 9.72//TBD double Coefficient_LowLimit = 0;//TBD double Coefficient_HighLimit = 255;//TBD diff --git a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/WHS_Card/D_Max5805_ADC_Blower/WHS_Blower.c b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/WHS_Card/D_Max5805_ADC_Blower/WHS_Blower.c index 9e626ec7f..4484f1932 100644 --- a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/WHS_Card/D_Max5805_ADC_Blower/WHS_Blower.c +++ b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/WHS_Card/D_Max5805_ADC_Blower/WHS_Blower.c @@ -175,7 +175,6 @@ bool WHS_init_Blower() bool LDACn_value = true; bool AUXn_value = true; bool update = 0; - int i; /* ---- config the WHS card 9555 configuration ----*/ @@ -630,7 +629,7 @@ uint32_t WHS_Pid_Testing_Func(double setParam,double measuredParam) { float calculated_speed; //float avreageSampleValue = 0; - int i; + //int i; /*WhsBlowerSamples[WhsBlowerSamplesPointer] = measuredParam;//(-1 * TranslatedReadValue); WhsBlowerSamplesPointer++; diff --git a/Software/Embedded_SW/Embedded/Modules/Diagnostics/DiagnosticsHoming.c b/Software/Embedded_SW/Embedded/Modules/Diagnostics/DiagnosticsHoming.c index 4cd91443b..71343c78f 100644 --- a/Software/Embedded_SW/Embedded/Modules/Diagnostics/DiagnosticsHoming.c +++ b/Software/Embedded_SW/Embedded/Modules/Diagnostics/DiagnosticsHoming.c @@ -631,7 +631,6 @@ uint32_t Diagnostics_Dryer_Loading_Callback(uint32_t MotorId, uint32_t ReadValue uint32_t Diagnostics_Dryer_Loading(void) { //float Calc_angle; -#warning assuming loading starts from 0 if (dryerbufferlength) LoadArmRounds = (int)dryerbufferlength; MCU_E2PromRead(EEPROM_STORAGE_DRYER_CENTER,&D_DrierPrevLocation); diff --git a/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c b/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c index 6f5b5fe23..3f5e4f5b2 100644 --- a/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c +++ b/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c @@ -837,10 +837,11 @@ void FlashInitAndLoad(void) uint32_t Bytes = 0; ConfigurationParameters *Params = NULL; - ProcessParameters* ProcessParams = NULL; - UploadProcessParametersRequest* request = NULL; + //ProcessParameters* ProcessParams = NULL; + //UploadProcessParametersRequest* request = NULL; + + //char ProcessParamsPath[50] = "0://SysInfo//ProcessP.cfg"; - char ProcessParamsPath[50] = "0://SysInfo//ProcessP.cfg"; #ifdef WATCHDOG ROM_WatchdogResetDisable(WATCHDOG0_BASE); uint32_t timeout = 0xFFFFFFFFU; diff --git a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c index 2abcc2b31..1568e51c5 100644 --- a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c +++ b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c @@ -1115,7 +1115,6 @@ uint32_t HeaterBlowerMaxTempCBFunction(uint32_t IfIndex, uint32_t readValue) uint32_t BlowerPt100Read = 0; int index=HEATER_TYPE_MAX_HEATERS; - int32_t MaxreadValue; if (IfIndex>>8 != IfTypeHeaters) { diff --git a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c index 0d81e5447..b52f8b908 100644 --- a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c +++ b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c @@ -558,7 +558,6 @@ bool AdjustDispenserSpeedToPressure(int DispenserId, double RefMaxPressure,doubl int i; int NumofReadyDispensers = 0; TimerMotors_t HW_Motor_Id; - float updatedSpeed,tempSpeed; JobDispenser **Dispensers; //set the speed only before the first segment, speed is constant accros job int Dispenser_i,n_dispensers; @@ -1230,7 +1229,7 @@ uint32_t IDS_Cleaning_Stop_Cleaning_Solution (callback_fptr callback); } if (segmentfirst_speed > MINIMAL_MOTOR_SPEED) { - char IdMessage[100]; + //char IdMessage[100]; segmentfirst_speed *= (100+WFCF); segmentfirst_speed /= 100; DispenserSegmentReady[DispenserId] = false; diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c index 4ec45c5b8..c37617037 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c @@ -363,7 +363,9 @@ uint32_t Screw100msecDirectionChange(uint32_t deviceID, uint32_t BusyFlag) { //uint32_t Steps; double temp,tempScrewSpeed; - int i,tempmot; +#ifdef FOUR_WINDERS + int tempmot; +#endif //double screw_horizontal_speed = 0; //double RotationsPerSecond; if (WinderMotorSpeedCounter++>=MAX_WINDER_SPEED_CALCULATION) diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c index e7336cc9d..f13f76cfb 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c @@ -560,7 +560,6 @@ uint32_t ThreadControlCBFunction(uint32_t IfIndex, uint32_t ReadValue) //extern int MotorSamplePointer[MAX_THREAD_MOTORS_NUM]; //read value is the dancer angle int i,index=MAX_THREAD_MOTORS_NUM; - int len; int DancerId; int32_t TranslatedReadValue, avreageSampleValue = 0;//,avreageMotorSampleValue = 0; //double tempcalcspeed = 0; @@ -747,7 +746,7 @@ uint32_t ThreadControlCBFunction(uint32_t IfIndex, uint32_t ReadValue) if (index >= WINDER_MOTOR) { // FirstCalcInJob = false; - len = usnprintf(ATMessage[index], 150, "index %d read %d avg %d error(6) %d integral(9) %d,delta(9) %d, calc(3) %d speed %d %d",index-WINDER_MOTOR+1, + usnprintf(ATMessage[index], 150, "index %d read %d avg %d error(6) %d integral(9) %d,delta(9) %d, calc(3) %d speed %d %d",index-WINDER_MOTOR+1, TranslatedReadValue,avreageSampleValue,(int)(MotorControlConfig[index].m_mesuredParam*1000000), (int)(MotorControlConfig[index].m_integral*1000000000),(int)((MotorControlConfig[index].m_mesuredParam*MotorControlConfig[index].m_params.dt)*1000000000), (int)(MotorControlConfig[index].m_calculatedError*1000),(int)calculated_speed, (int)(InitialDryerSpeed*100/OriginalMotorSpd_2PPS[DRYER_MOTOR])); @@ -784,7 +783,6 @@ uint32_t ThreadControlCBFunction(uint32_t IfIndex, uint32_t ReadValue) ReportWithPackageFilter(ThreadFilter,"MotorSpeedUpdated",__FILE__,index,(int)OriginalMotorSpd_2PPS[index],RpWarning,(int)CurrentControlledSpeed[index],0); }*/ #ifdef TEST_PID_THREAD - int len; if ((JobCounter % 2000) == index*100) //if (keepdata == true) { @@ -796,7 +794,7 @@ uint32_t ThreadControlCBFunction(uint32_t IfIndex, uint32_t ReadValue) NormError[controlIndex] = MotorControlConfig[index].m_mesuredParam; mIntegral[controlIndex] = MotorControlConfig[index].m_integral; timestamp[controlIndex] = msec_millisecondCounter;*/ - len = usnprintf(TMessage, 150, "read %d avg %d error(6) %d integral(9) %d,delta(9) %d, calc(3) %d speed %d", + usnprintf(TMessage, 150, "read %d avg %d error(6) %d integral(9) %d,delta(9) %d, calc(3) %d speed %d", ReadValue,avreageSampleValue,(int)(MotorControlConfig[index].m_mesuredParam*1000000), (int)(MotorControlConfig[index].m_integral*1000000000),(int)((MotorControlConfig[index].m_mesuredParam*MotorControlConfig[index].m_params.dt)*1000000000), (int)(MotorControlConfig[index].m_calculatedError*1000),(int)calculated_speed); diff --git a/Software/Embedded_SW/Embedded/Modules/Waste/Waste_maint.c b/Software/Embedded_SW/Embedded/Modules/Waste/Waste_maint.c index fa89164d3..1ace8a50b 100644 --- a/Software/Embedded_SW/Embedded/Modules/Waste/Waste_maint.c +++ b/Software/Embedded_SW/Embedded/Modules/Waste/Waste_maint.c @@ -330,7 +330,6 @@ uint32_t Waste_DoorOpenDuringEmptying(uint32_t IfIndex, uint32_t ReadValue) } } return OK; -#warning add alarm on door open } void Waste_StateMachine_OneSecond_Call(void) diff --git a/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerIdle.c b/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerIdle.c index 57da1574b..604324948 100644 --- a/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerIdle.c +++ b/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerIdle.c @@ -187,7 +187,7 @@ bool getIdleState (void) {return powerIdleState;} uint32_t OutOfIdleUpdate(bool last) { uint32_t status = NOT_SUPPORTED; - +/* double calculate; int result = 0; MessageContainer responseContainer; @@ -197,7 +197,7 @@ uint32_t OutOfIdleUpdate(bool last) if (PowerUpToken[0] == 0) return OK; -/* response.has_state = true; + response.has_state = true; response.has_progresspercentage = true; if (last == false) diff --git a/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerOffSequence.c b/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerOffSequence.c index 15f363b9a..0a980159d 100644 --- a/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerOffSequence.c +++ b/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerOffSequence.c @@ -286,7 +286,7 @@ uint32_t PowerOffWaitForProcessesCallback(uint32_t IfIndex, uint32_t BusyFlag) } } if ((WHS_IsEmptying()|| - //MidTankFillingActive()|| + IFS_MidTankFilling()|| ThreadLoadingActive()|| SwUpgradeActive()|| (HomingActive == true))&& @@ -321,7 +321,7 @@ uint32_t PowerOffWaitForProcesses(void) } if (WHS_IsEmptying()|| - //MidTankFillingActive()|| + IFS_MidTankFilling()|| ThreadLoadingActive()|| SwUpgradeActive()|| (HomingActive == true)) -- cgit v1.3.1 From 07276289ff121853256bb894bc3040c4f5bfb2b0 Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Fri, 9 Oct 2020 16:46:20 +0300 Subject: ifs filling / waste emptying interface --- .../Embedded/Common/Utilities/RFIDTagHandling.c | 18 ++ .../Embedded/Common/Utilities/RFIDTagHandling.h | 2 + .../Embedded_SW/Embedded/Communication/Container.c | 7 + .../Communication/PMR/Common/MessageType.pb-c.c | 264 +++++++++++---------- .../Communication/PMR/Common/MessageType.pb-c.h | 6 + .../PMR/Debugging/StartDebugLogResponse.pb-c.c | 8 +- .../PMR/Debugging/StartDebugLogResponse.pb-c.h | 8 +- .../PMR/Diagnostics/FillingAction.pb-c.c | 45 ++++ .../PMR/Diagnostics/FillingAction.pb-c.h | 47 ++++ .../PMR/Diagnostics/StartInkFillingRequest.pb-c.c | 72 ++++++ .../PMR/Diagnostics/StartInkFillingRequest.pb-c.h | 70 ++++++ .../PMR/Diagnostics/StartInkFillingResponse.pb-c.c | 131 ++++++++++ .../PMR/Diagnostics/StartInkFillingResponse.pb-c.h | 78 ++++++ .../Diagnostics/StartWasteEmptyingRequest.pb-c.c | 72 ++++++ .../Diagnostics/StartWasteEmptyingRequest.pb-c.h | 70 ++++++ .../Diagnostics/StartWasteEmptyingResponse.pb-c.c | 131 ++++++++++ .../Diagnostics/StartWasteEmptyingResponse.pb-c.h | 78 ++++++ .../PMR/MachineStatus/MachineStatus.pb-c.c | 32 ++- .../PMR/MachineStatus/MachineStatus.pb-c.h | 7 +- .../PMR/MachineStatus/WasteCartridgeState.pb-c.c | 43 ++++ .../PMR/MachineStatus/WasteCartridgeState.pb-c.h | 46 ++++ .../PMR/Stubs/StubAllHardwareRequest.pb-c.c | 72 ++++++ .../PMR/Stubs/StubAllHardwareRequest.pb-c.h | 70 ++++++ .../PMR/Stubs/StubAllHardwareResponse.pb-c.c | 144 +++++++++++ .../PMR/Stubs/StubAllHardwareResponse.pb-c.h | 81 +++++++ .../Embedded_SW/Embedded/Drivers/Valves/Valve.c | 1 + .../Embedded/Modules/AlarmHandling/AlarmHandling.c | 1 + .../Embedded/Modules/General/MachineStatus.c | 51 +++- .../Embedded/Modules/Heaters/Heaters_ex.h | 1 + Software/Embedded_SW/Embedded/Modules/IFS/ifs.c | 51 ++++ Software/Embedded_SW/Embedded/Modules/IFS/ifs.h | 1 + .../Embedded/Modules/Thread/ThreadLoad.c | 2 +- .../Embedded_SW/Embedded/Modules/Waste/Waste_ex.h | 2 + .../Embedded/Modules/Waste/Waste_maint.c | 55 ++++- .../Initialization/PowerOffSequence.c | 1 + .../Embedded/StateMachines/Printing/JobSTM.c | 1 + Software/PMR/Messages/Common/MessageType.proto | 7 +- .../Diagnostics/StartInkFillingRequest.proto | 2 +- .../Diagnostics/StartInkFillingResponse.proto | 2 +- .../Diagnostics/StartWasteEmptyingRequest.proto | 2 +- .../Diagnostics/StartWasteEmptyingResponse.proto | 2 +- 41 files changed, 1636 insertions(+), 148 deletions(-) create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/FillingAction.pb-c.c create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/FillingAction.pb-c.h create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/StartInkFillingRequest.pb-c.c create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/StartInkFillingRequest.pb-c.h create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/StartInkFillingResponse.pb-c.c create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/StartInkFillingResponse.pb-c.h create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/StartWasteEmptyingRequest.pb-c.c create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/StartWasteEmptyingRequest.pb-c.h create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/StartWasteEmptyingResponse.pb-c.c create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/StartWasteEmptyingResponse.pb-c.h create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/MachineStatus/WasteCartridgeState.pb-c.c create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/MachineStatus/WasteCartridgeState.pb-c.h create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/Stubs/StubAllHardwareRequest.pb-c.c create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/Stubs/StubAllHardwareRequest.pb-c.h create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/Stubs/StubAllHardwareResponse.pb-c.c create mode 100644 Software/Embedded_SW/Embedded/Communication/PMR/Stubs/StubAllHardwareResponse.pb-c.h (limited to 'Software/Embedded_SW/Embedded/Modules/Thread') diff --git a/Software/Embedded_SW/Embedded/Common/Utilities/RFIDTagHandling.c b/Software/Embedded_SW/Embedded/Common/Utilities/RFIDTagHandling.c index f6bc50a7e..2bb073bf8 100644 --- a/Software/Embedded_SW/Embedded/Common/Utilities/RFIDTagHandling.c +++ b/Software/Embedded_SW/Embedded/Common/Utilities/RFIDTagHandling.c @@ -18,6 +18,24 @@ #include "CartridgeTagContent.pb-c.h" #include "Cartridge.pb-c.h" +uint32_t LoadCartridgeData(PANEL_BUTTON_OR_CRAT_ID Cart,void *CartridgePtr) +{ + if (CartridgePtr == NULL) return ERROR; + if (Cart>CART_3) return ERROR; + Cartridge *Cartridge = CartridgePtr; + /* + ProtobufCMessage base; + protobuf_c_boolean has_slot; + CartridgeSlot slot; + CartridgeTagContent *tag; + protobuf_c_boolean has_index; + int32_t index; + * */ + Cartridge->has_slot = true; + Cartridge->slot = Cart-1; + //Cartridge->tag = NFCTag_Tag2PPC(NFC_TagRead[Cart-1].Struct); + return OK; +} /* typedef struct { diff --git a/Software/Embedded_SW/Embedded/Common/Utilities/RFIDTagHandling.h b/Software/Embedded_SW/Embedded/Common/Utilities/RFIDTagHandling.h index 496b1aae3..0eee787f4 100644 --- a/Software/Embedded_SW/Embedded/Common/Utilities/RFIDTagHandling.h +++ b/Software/Embedded_SW/Embedded/Common/Utilities/RFIDTagHandling.h @@ -11,4 +11,6 @@ CartridgeTagContent * NFCTag_Tag2PPC(NFCTag_t *Tag); NFCTag_t * NFCTag_PPC2Tag( CartridgeTagContent *PpcTag); + uint32_t LoadCartridgeData(PANEL_BUTTON_OR_CRAT_ID Cart,void *CartridgePtr); + diff --git a/Software/Embedded_SW/Embedded/Communication/Container.c b/Software/Embedded_SW/Embedded/Communication/Container.c index 307e4eecb..546f4bb58 100644 --- a/Software/Embedded_SW/Embedded/Communication/Container.c +++ b/Software/Embedded_SW/Embedded/Communication/Container.c @@ -42,6 +42,7 @@ #include "Modules/General/process.h" #include "Modules/Thread/Thread_ex.h" #include "Modules/Ids/Ids_ex.h" +#include "Modules/waste/waste_ex.h" #include "Modules/Ifs/Ifs.h" #include "Common/SWUpdate/FileSystem.h" @@ -469,6 +470,12 @@ void receive_callback(char* buffer, size_t length) case MESSAGE_TYPE__CartridgeValidationResponse: CartridgeValidationResponseFunc(requestContainer); break; + case MESSAGE_TYPE__StartWasteEmptyingRequest: + StartWasteEmptyingRequestFunc(requestContainer); + break; + case MESSAGE_TYPE__StartInkFillingRequest: + StartInkFillingRequestFunc(requestContainer); + break; case MESSAGE_TYPE__MidTankDataSetupRequest: MidTankDataSetupFunc(requestContainer); break; diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Common/MessageType.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/Common/MessageType.pb-c.c index d6c0259e2..a59dccb97 100644 --- a/Software/Embedded_SW/Embedded/Communication/PMR/Common/MessageType.pb-c.c +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Common/MessageType.pb-c.c @@ -7,7 +7,7 @@ #endif #include "MessageType.pb-c.h" -static const ProtobufCEnumValue message_type__enum_values_by_number[263] = +static const ProtobufCEnumValue message_type__enum_values_by_number[269] = { { "", "", 0 }, { "", "", 1 }, @@ -121,6 +121,8 @@ static const ProtobufCEnumValue message_type__enum_values_by_number[263] = { "", "", 110 }, { "", "", 111 }, { "", "", 112 }, + { "", "", 113 }, + { "", "", 114 }, { "", "", 1000 }, { "", "", 1001 }, { "", "", 1002 }, @@ -188,6 +190,10 @@ static const ProtobufCEnumValue message_type__enum_values_by_number[263] = { "", "", 2043 }, { "", "", 2044 }, { "", "", 2045 }, + { "", "", 2046 }, + { "", "", 2047 }, + { "", "", 2048 }, + { "", "", 2049 }, { "", "", 3000 }, { "", "", 3001 }, { "", "", 3002 }, @@ -274,151 +280,155 @@ static const ProtobufCEnumValue message_type__enum_values_by_number[263] = { "", "", 11007 }, }; static const ProtobufCIntRange message_type__value_ranges[] = { -{0, 0},{3, 2},{1000, 112},{2000, 133},{3000, 179},{4000, 193},{5000, 201},{6000, 205},{7000, 211},{8000, 235},{9000, 243},{10000, 247},{11000, 255},{0, 263} +{0, 0},{3, 2},{1000, 114},{2000, 135},{3000, 185},{4000, 199},{5000, 207},{6000, 211},{7000, 217},{8000, 241},{9000, 249},{10000, 253},{11000, 261},{0, 269} }; -static const ProtobufCEnumValueIndex message_type__enum_values_by_name[263] = +static const ProtobufCEnumValueIndex message_type__enum_values_by_name[269] = { - { "", 191 }, - { "", 192 }, - { "", 181 }, - { "", 182 }, - { "", 249 }, - { "", 250 }, - { "", 253 }, - { "", 254 }, - { "", 233 }, - { "", 234 }, + { "", 197 }, + { "", 198 }, + { "", 187 }, + { "", 188 }, + { "", 255 }, + { "", 256 }, + { "", 259 }, + { "", 260 }, + { "", 239 }, + { "", 240 }, { "", 2 }, { "", 3 }, - { "", 177 }, - { "", 178 }, - { "", 125 }, - { "", 126 }, - { "", 131 }, - { "", 132 }, - { "", 207 }, - { "", 208 }, - { "", 257 }, - { "", 258 }, - { "", 219 }, - { "", 220 }, - { "", 185 }, - { "", 186 }, - { "", 221 }, - { "", 222 }, - { "", 117 }, - { "", 118 }, - { "", 209 }, - { "", 210 }, - { "", 143 }, - { "", 144 }, - { "", 149 }, - { "", 150 }, - { "", 235 }, - { "", 236 }, + { "", 179 }, + { "", 180 }, + { "", 127 }, + { "", 128 }, + { "", 133 }, + { "", 134 }, + { "", 213 }, + { "", 214 }, + { "", 263 }, + { "", 264 }, + { "", 225 }, + { "", 226 }, + { "", 191 }, + { "", 192 }, + { "", 227 }, + { "", 228 }, + { "", 119 }, + { "", 120 }, + { "", 215 }, + { "", 216 }, { "", 145 }, { "", 146 }, + { "", 151 }, + { "", 152 }, + { "", 241 }, + { "", 242 }, { "", 147 }, { "", 148 }, + { "", 149 }, + { "", 150 }, { "", 1 }, - { "", 215 }, - { "", 216 }, - { "", 113 }, - { "", 114 }, + { "", 221 }, + { "", 222 }, { "", 115 }, { "", 116 }, - { "", 112 }, + { "", 117 }, + { "", 118 }, + { "", 114 }, + { "", 235 }, + { "", 236 }, + { "", 219 }, + { "", 220 }, + { "", 233 }, + { "", 234 }, + { "", 217 }, + { "", 218 }, + { "", 131 }, + { "", 132 }, + { "", 231 }, + { "", 232 }, { "", 229 }, { "", 230 }, - { "", 213 }, - { "", 214 }, - { "", 227 }, - { "", 228 }, + { "", 185 }, + { "", 186 }, { "", 211 }, { "", 212 }, - { "", 129 }, - { "", 130 }, - { "", 225 }, - { "", 226 }, { "", 223 }, { "", 224 }, - { "", 179 }, - { "", 180 }, - { "", 205 }, - { "", 206 }, - { "", 217 }, - { "", 218 }, - { "", 239 }, - { "", 240 }, - { "", 241 }, - { "", 242 }, - { "", 237 }, - { "", 238 }, - { "", 135 }, - { "", 136 }, - { "", 141 }, - { "", 142 }, + { "", 245 }, + { "", 246 }, + { "", 247 }, + { "", 248 }, + { "", 243 }, + { "", 244 }, { "", 137 }, { "", 138 }, + { "", 143 }, + { "", 144 }, { "", 139 }, { "", 140 }, + { "", 141 }, + { "", 142 }, { "", 0 }, - { "", 119 }, - { "", 120 }, + { "", 121 }, + { "", 122 }, { "", 4 }, { "", 5 }, + { "", 161 }, + { "", 162 }, + { "", 193 }, + { "", 194 }, + { "", 171 }, + { "", 172 }, { "", 159 }, { "", 160 }, - { "", 187 }, - { "", 188 }, + { "", 203 }, + { "", 204 }, + { "", 153 }, + { "", 154 }, { "", 169 }, { "", 170 }, - { "", 157 }, - { "", 158 }, - { "", 197 }, - { "", 198 }, - { "", 151 }, - { "", 152 }, - { "", 167 }, - { "", 168 }, - { "", 171 }, - { "", 172 }, - { "", 199 }, - { "", 200 }, - { "", 121 }, - { "", 122 }, { "", 173 }, { "", 174 }, - { "", 193 }, - { "", 194 }, - { "", 133 }, - { "", 134 }, - { "", 163 }, - { "", 164 }, - { "", 189 }, - { "", 190 }, - { "", 243 }, - { "", 244 }, - { "", 247 }, - { "", 248 }, - { "", 251 }, - { "", 252 }, - { "", 255 }, - { "", 256 }, + { "", 205 }, + { "", 206 }, { "", 123 }, { "", 124 }, { "", 175 }, { "", 176 }, - { "", 195 }, - { "", 196 }, - { "", 161 }, - { "", 162 }, + { "", 199 }, + { "", 200 }, + { "", 135 }, + { "", 136 }, { "", 165 }, { "", 166 }, - { "", 245 }, - { "", 246 }, - { "", 259 }, - { "", 260 }, + { "", 195 }, + { "", 196 }, + { "", 183 }, + { "", 184 }, + { "", 249 }, + { "", 250 }, + { "", 253 }, + { "", 254 }, + { "", 257 }, + { "", 258 }, + { "", 261 }, + { "", 262 }, + { "", 181 }, + { "", 182 }, + { "", 125 }, + { "", 126 }, + { "", 177 }, + { "", 178 }, + { "", 201 }, + { "", 202 }, + { "", 163 }, + { "", 164 }, + { "", 167 }, + { "", 168 }, + { "", 251 }, + { "", 252 }, + { "", 265 }, + { "", 266 }, { "", 100 }, { "", 101 }, { "", 6 }, @@ -461,6 +471,8 @@ static const ProtobufCEnumValueIndex message_type__enum_values_by_name[263] = { "", 21 }, { "", 56 }, { "", 57 }, + { "", 112 }, + { "", 113 }, { "", 22 }, { "", 23 }, { "", 62 }, @@ -525,22 +537,22 @@ static const ProtobufCEnumValueIndex message_type__enum_values_by_name[263] = { "", 31 }, { "", 106 }, { "", 107 }, - { "", 203 }, - { "", 204 }, + { "", 209 }, + { "", 210 }, + { "", 157 }, + { "", 158 }, { "", 155 }, { "", 156 }, - { "", 153 }, - { "", 154 }, - { "", 261 }, - { "", 262 }, - { "", 127 }, - { "", 128 }, - { "", 201 }, - { "", 202 }, - { "", 183 }, - { "", 184 }, - { "", 231 }, - { "", 232 }, + { "", 267 }, + { "", 268 }, + { "", 129 }, + { "", 130 }, + { "", 207 }, + { "", 208 }, + { "", 189 }, + { "", 190 }, + { "", 237 }, + { "", 238 }, }; const ProtobufCEnumDescriptor message_type__descriptor = { @@ -549,9 +561,9 @@ const ProtobufCEnumDescriptor message_type__descriptor = "", "", "", - 263, + 269, message_type__enum_values_by_number, - 263, + 269, message_type__enum_values_by_name, 13, message_type__value_ranges, diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Common/MessageType.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/Common/MessageType.pb-c.h index 58bd2112c..6df8fa5f9 100644 --- a/Software/Embedded_SW/Embedded/Communication/PMR/Common/MessageType.pb-c.h +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Common/MessageType.pb-c.h @@ -132,6 +132,8 @@ typedef enum _MessageType { MESSAGE_TYPE__StubMainCardEEpromReadResponse = 110, MESSAGE_TYPE__StubMainCardEEpromWriteRequest = 111, MESSAGE_TYPE__StubMainCardEEpromWriteResponse = 112, + MESSAGE_TYPE__StubHeadEEpromRequest = 113, + MESSAGE_TYPE__StubHeadEEpromResponse = 114, MESSAGE_TYPE__ExternalBridgeUdpDiscoveryPacket = 1000, MESSAGE_TYPE__ExternalBridgeLoginRequest = 1001, MESSAGE_TYPE__ExternalBridgeLoginResponse = 1002, @@ -199,6 +201,10 @@ typedef enum _MessageType { MESSAGE_TYPE__StopCartridgesUpdateResponse = 2043, MESSAGE_TYPE__CartridgeValidationRequest = 2044, MESSAGE_TYPE__CartridgeValidationResponse = 2045, + MESSAGE_TYPE__StartWasteEmptyingRequest = 2046, + MESSAGE_TYPE__StartWasteEmptyingResponse = 2047, + MESSAGE_TYPE__StartInkFillingRequest = 2048, + MESSAGE_TYPE__StartInkFillingResponse = 2049, MESSAGE_TYPE__JobRequest = 3000, MESSAGE_TYPE__JobResponse = 3001, MESSAGE_TYPE__AbortJobRequest = 3002, diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Debugging/StartDebugLogResponse.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/Debugging/StartDebugLogResponse.pb-c.c index 855480fa4..2640767b6 100644 --- a/Software/Embedded_SW/Embedded/Communication/PMR/Debugging/StartDebugLogResponse.pb-c.c +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Debugging/StartDebugLogResponse.pb-c.c @@ -82,7 +82,7 @@ static const ProtobufCFieldDescriptor start_debug_log_response__field_descriptor "", 3, PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_UINT32, + PROTOBUF_C_TYPE_INT32, offsetof(StartDebugLogResponse, has_linenumber), offsetof(StartDebugLogResponse, linenumber), NULL, @@ -94,7 +94,7 @@ static const ProtobufCFieldDescriptor start_debug_log_response__field_descriptor "", 4, PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_UINT32, + PROTOBUF_C_TYPE_INT32, offsetof(StartDebugLogResponse, has_filter), offsetof(StartDebugLogResponse, filter), NULL, @@ -118,7 +118,7 @@ static const ProtobufCFieldDescriptor start_debug_log_response__field_descriptor "", 6, PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_UINT32, + PROTOBUF_C_TYPE_INT32, offsetof(StartDebugLogResponse, has_moduleid), offsetof(StartDebugLogResponse, moduleid), NULL, @@ -130,7 +130,7 @@ static const ProtobufCFieldDescriptor start_debug_log_response__field_descriptor "", 7, PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_UINT32, + PROTOBUF_C_TYPE_INT32, offsetof(StartDebugLogResponse, has_parameter), offsetof(StartDebugLogResponse, parameter), NULL, diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Debugging/StartDebugLogResponse.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/Debugging/StartDebugLogResponse.pb-c.h index ec58375ac..5a58da7ea 100644 --- a/Software/Embedded_SW/Embedded/Communication/PMR/Debugging/StartDebugLogResponse.pb-c.h +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Debugging/StartDebugLogResponse.pb-c.h @@ -31,14 +31,14 @@ struct _StartDebugLogResponse DebugLogCategory category; char *filename; protobuf_c_boolean has_linenumber; - uint32_t linenumber; + int32_t linenumber; protobuf_c_boolean has_filter; - uint32_t filter; + int32_t filter; char *message; protobuf_c_boolean has_moduleid; - uint32_t moduleid; + int32_t moduleid; protobuf_c_boolean has_parameter; - uint32_t parameter; + int32_t parameter; }; #define START_DEBUG_LOG_RESPONSE__INIT \ { PROTOBUF_C_MESSAGE_INIT (&start_debug_log_response__descriptor) \ diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/FillingAction.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/FillingAction.pb-c.c new file mode 100644 index 000000000..686c3c58f --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/FillingAction.pb-c.c @@ -0,0 +1,45 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: FillingAction.proto */ + +/* Do not generate deprecated warnings for self */ +#ifndef PROTOBUF_C__NO_DEPRECATED +#define PROTOBUF_C__NO_DEPRECATED +#endif + +#include "FillingAction.pb-c.h" +static const ProtobufCEnumValue filling_action__enum_values_by_number[6] = +{ + { "", "", 0 }, + { "", "", 1 }, + { "", "", 2 }, + { "", "", 3 }, + { "", "", 4 }, + { "", "", 5 }, +}; +static const ProtobufCIntRange filling_action__value_ranges[] = { +{0, 0},{0, 6} +}; +static const ProtobufCEnumValueIndex filling_action__enum_values_by_name[6] = +{ + { "", 5 }, + { "", 3 }, + { "", 4 }, + { "", 2 }, + { "", 1 }, + { "", 0 }, +}; +const ProtobufCEnumDescriptor filling_action__descriptor = +{ + PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC, + "", + "", + "", + "", + 6, + filling_action__enum_values_by_number, + 6, + filling_action__enum_values_by_name, + 1, + filling_action__value_ranges, + NULL,NULL,NULL,NULL /* reserved[1234] */ +}; diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/FillingAction.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/FillingAction.pb-c.h new file mode 100644 index 000000000..e48f99397 --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/FillingAction.pb-c.h @@ -0,0 +1,47 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: FillingAction.proto */ + +#ifndef PROTOBUF_C_FillingAction_2eproto__INCLUDED +#define PROTOBUF_C_FillingAction_2eproto__INCLUDED + +#include + +PROTOBUF_C__BEGIN_DECLS + +#if PROTOBUF_C_VERSION_NUMBER < 1003000 +# error This file was generated by a newer version of protoc-c which is incompatible with your libprotobuf-c headers. Please update your headers. +#elif 1003000 < PROTOBUF_C_MIN_COMPILER_VERSION +# error This file was generated by an older version of protoc-c which is incompatible with your libprotobuf-c headers. Please regenerate this file with a newer version of protoc-c. +#endif + + + + +/* --- enums --- */ + +typedef enum _FillingAction { + FILLING_ACTION__None = 0, + FILLING_ACTION__Inserted = 1, + FILLING_ACTION__Filling = 2, + FILLING_ACTION__End = 3, + FILLING_ACTION__Error = 4, + FILLING_ACTION__Ejected = 5 + PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(FILLING_ACTION) +} FillingAction; + +/* --- messages --- */ + +/* --- per-message closures --- */ + + +/* --- services --- */ + + +/* --- descriptors --- */ + +extern const ProtobufCEnumDescriptor filling_action__descriptor; + +PROTOBUF_C__END_DECLS + + +#endif /* PROTOBUF_C_FillingAction_2eproto__INCLUDED */ diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/StartInkFillingRequest.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/StartInkFillingRequest.pb-c.c new file mode 100644 index 000000000..b56884185 --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/StartInkFillingRequest.pb-c.c @@ -0,0 +1,72 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: StartInkFillingRequest.proto */ + +/* Do not generate deprecated warnings for self */ +#ifndef PROTOBUF_C__NO_DEPRECATED +#define PROTOBUF_C__NO_DEPRECATED +#endif + +#include "StartInkFillingRequest.pb-c.h" +void start_ink_filling_request__init + (StartInkFillingRequest *message) +{ + static const StartInkFillingRequest init_value = START_INK_FILLING_REQUEST__INIT; + *message = init_value; +} +size_t start_ink_filling_request__get_packed_size + (const StartInkFillingRequest *message) +{ + assert(message->base.descriptor == &start_ink_filling_request__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t start_ink_filling_request__pack + (const StartInkFillingRequest *message, + uint8_t *out) +{ + assert(message->base.descriptor == &start_ink_filling_request__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t start_ink_filling_request__pack_to_buffer + (const StartInkFillingRequest *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &start_ink_filling_request__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +StartInkFillingRequest * + start_ink_filling_request__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (StartInkFillingRequest *) + protobuf_c_message_unpack (&start_ink_filling_request__descriptor, + allocator, len, data); +} +void start_ink_filling_request__free_unpacked + (StartInkFillingRequest *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &start_ink_filling_request__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +#define start_ink_filling_request__field_descriptors NULL +#define start_ink_filling_request__field_indices_by_name NULL +#define start_ink_filling_request__number_ranges NULL +const ProtobufCMessageDescriptor start_ink_filling_request__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "", + "", + "", + "", + sizeof(StartInkFillingRequest), + 0, + start_ink_filling_request__field_descriptors, + start_ink_filling_request__field_indices_by_name, + 0, start_ink_filling_request__number_ranges, + (ProtobufCMessageInit) start_ink_filling_request__init, + NULL,NULL,NULL /* reserved[123] */ +}; diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/StartInkFillingRequest.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/StartInkFillingRequest.pb-c.h new file mode 100644 index 000000000..bda7b4229 --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/StartInkFillingRequest.pb-c.h @@ -0,0 +1,70 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: StartInkFillingRequest.proto */ + +#ifndef PROTOBUF_C_StartInkFillingRequest_2eproto__INCLUDED +#define PROTOBUF_C_StartInkFillingRequest_2eproto__INCLUDED + +#include + +PROTOBUF_C__BEGIN_DECLS + +#if PROTOBUF_C_VERSION_NUMBER < 1003000 +# error This file was generated by a newer version of protoc-c which is incompatible with your libprotobuf-c headers. Please update your headers. +#elif 1003000 < PROTOBUF_C_MIN_COMPILER_VERSION +# error This file was generated by an older version of protoc-c which is incompatible with your libprotobuf-c headers. Please regenerate this file with a newer version of protoc-c. +#endif + + +typedef struct _StartInkFillingRequest StartInkFillingRequest; + + +/* --- enums --- */ + + +/* --- messages --- */ + +struct _StartInkFillingRequest +{ + ProtobufCMessage base; +}; +#define START_INK_FILLING_REQUEST__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&start_ink_filling_request__descriptor) \ + } + + +/* StartInkFillingRequest methods */ +void start_ink_filling_request__init + (StartInkFillingRequest *message); +size_t start_ink_filling_request__get_packed_size + (const StartInkFillingRequest *message); +size_t start_ink_filling_request__pack + (const StartInkFillingRequest *message, + uint8_t *out); +size_t start_ink_filling_request__pack_to_buffer + (const StartInkFillingRequest *message, + ProtobufCBuffer *buffer); +StartInkFillingRequest * + start_ink_filling_request__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void start_ink_filling_request__free_unpacked + (StartInkFillingRequest *message, + ProtobufCAllocator *allocator); +/* --- per-message closures --- */ + +typedef void (*StartInkFillingRequest_Closure) + (const StartInkFillingRequest *message, + void *closure_data); + +/* --- services --- */ + + +/* --- descriptors --- */ + +extern const ProtobufCMessageDescriptor start_ink_filling_request__descriptor; + +PROTOBUF_C__END_DECLS + + +#endif /* PROTOBUF_C_StartInkFillingRequest_2eproto__INCLUDED */ diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/StartInkFillingResponse.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/StartInkFillingResponse.pb-c.c new file mode 100644 index 000000000..d68ad33e7 --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/StartInkFillingResponse.pb-c.c @@ -0,0 +1,131 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: StartInkFillingResponse.proto */ + +/* Do not generate deprecated warnings for self */ +#ifndef PROTOBUF_C__NO_DEPRECATED +#define PROTOBUF_C__NO_DEPRECATED +#endif + +#include "StartInkFillingResponse.pb-c.h" +void start_ink_filling_response__init + (StartInkFillingResponse *message) +{ + static const StartInkFillingResponse init_value = START_INK_FILLING_RESPONSE__INIT; + *message = init_value; +} +size_t start_ink_filling_response__get_packed_size + (const StartInkFillingResponse *message) +{ + assert(message->base.descriptor == &start_ink_filling_response__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t start_ink_filling_response__pack + (const StartInkFillingResponse *message, + uint8_t *out) +{ + assert(message->base.descriptor == &start_ink_filling_response__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t start_ink_filling_response__pack_to_buffer + (const StartInkFillingResponse *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &start_ink_filling_response__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +StartInkFillingResponse * + start_ink_filling_response__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (StartInkFillingResponse *) + protobuf_c_message_unpack (&start_ink_filling_response__descriptor, + allocator, len, data); +} +void start_ink_filling_response__free_unpacked + (StartInkFillingResponse *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &start_ink_filling_response__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +static const ProtobufCFieldDescriptor start_ink_filling_response__field_descriptors[4] = +{ + { + "", + 1, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_MESSAGE, + 0, /* quantifier_offset */ + offsetof(StartInkFillingResponse, cartridge), + &cartridge__descriptor, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "", + 2, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_ENUM, + offsetof(StartInkFillingResponse, has_action), + offsetof(StartInkFillingResponse, action), + &filling_action__descriptor, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "", + 3, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_DOUBLE, + offsetof(StartInkFillingResponse, has_progresspercentage), + offsetof(StartInkFillingResponse, progresspercentage), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "", + 4, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(StartInkFillingResponse, message), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned start_ink_filling_response__field_indices_by_name[] = { + 1, /* field[1] = Action */ + 0, /* field[0] = Cartridge */ + 3, /* field[3] = Message */ + 2, /* field[2] = ProgressPercentage */ +}; +static const ProtobufCIntRange start_ink_filling_response__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 4 } +}; +const ProtobufCMessageDescriptor start_ink_filling_response__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "", + "", + "", + "", + sizeof(StartInkFillingResponse), + 4, + start_ink_filling_response__field_descriptors, + start_ink_filling_response__field_indices_by_name, + 1, start_ink_filling_response__number_ranges, + (ProtobufCMessageInit) start_ink_filling_response__init, + NULL,NULL,NULL /* reserved[123] */ +}; diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/StartInkFillingResponse.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/StartInkFillingResponse.pb-c.h new file mode 100644 index 000000000..5c1c7ddb2 --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/StartInkFillingResponse.pb-c.h @@ -0,0 +1,78 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: StartInkFillingResponse.proto */ + +#ifndef PROTOBUF_C_StartInkFillingResponse_2eproto__INCLUDED +#define PROTOBUF_C_StartInkFillingResponse_2eproto__INCLUDED + +#include + +PROTOBUF_C__BEGIN_DECLS + +#if PROTOBUF_C_VERSION_NUMBER < 1003000 +# error This file was generated by a newer version of protoc-c which is incompatible with your libprotobuf-c headers. Please update your headers. +#elif 1003000 < PROTOBUF_C_MIN_COMPILER_VERSION +# error This file was generated by an older version of protoc-c which is incompatible with your libprotobuf-c headers. Please regenerate this file with a newer version of protoc-c. +#endif + +#include "Cartridge.pb-c.h" +#include "FillingAction.pb-c.h" + +typedef struct _StartInkFillingResponse StartInkFillingResponse; + + +/* --- enums --- */ + + +/* --- messages --- */ + +struct _StartInkFillingResponse +{ + ProtobufCMessage base; + Cartridge *cartridge; + protobuf_c_boolean has_action; + FillingAction action; + protobuf_c_boolean has_progresspercentage; + double progresspercentage; + char *message; +}; +#define START_INK_FILLING_RESPONSE__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&start_ink_filling_response__descriptor) \ + , NULL, 0, FILLING_ACTION__None, 0, 0, NULL } + + +/* StartInkFillingResponse methods */ +void start_ink_filling_response__init + (StartInkFillingResponse *message); +size_t start_ink_filling_response__get_packed_size + (const StartInkFillingResponse *message); +size_t start_ink_filling_response__pack + (const StartInkFillingResponse *message, + uint8_t *out); +size_t start_ink_filling_response__pack_to_buffer + (const StartInkFillingResponse *message, + ProtobufCBuffer *buffer); +StartInkFillingResponse * + start_ink_filling_response__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void start_ink_filling_response__free_unpacked + (StartInkFillingResponse *message, + ProtobufCAllocator *allocator); +/* --- per-message closures --- */ + +typedef void (*StartInkFillingResponse_Closure) + (const StartInkFillingResponse *message, + void *closure_data); + +/* --- services --- */ + + +/* --- descriptors --- */ + +extern const ProtobufCMessageDescriptor start_ink_filling_response__descriptor; + +PROTOBUF_C__END_DECLS + + +#endif /* PROTOBUF_C_StartInkFillingResponse_2eproto__INCLUDED */ diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/StartWasteEmptyingRequest.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/StartWasteEmptyingRequest.pb-c.c new file mode 100644 index 000000000..1b9c856fa --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/StartWasteEmptyingRequest.pb-c.c @@ -0,0 +1,72 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: StartWasteEmptyingRequest.proto */ + +/* Do not generate deprecated warnings for self */ +#ifndef PROTOBUF_C__NO_DEPRECATED +#define PROTOBUF_C__NO_DEPRECATED +#endif + +#include "StartWasteEmptyingRequest.pb-c.h" +void start_waste_emptying_request__init + (StartWasteEmptyingRequest *message) +{ + static const StartWasteEmptyingRequest init_value = START_WASTE_EMPTYING_REQUEST__INIT; + *message = init_value; +} +size_t start_waste_emptying_request__get_packed_size + (const StartWasteEmptyingRequest *message) +{ + assert(message->base.descriptor == &start_waste_emptying_request__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t start_waste_emptying_request__pack + (const StartWasteEmptyingRequest *message, + uint8_t *out) +{ + assert(message->base.descriptor == &start_waste_emptying_request__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t start_waste_emptying_request__pack_to_buffer + (const StartWasteEmptyingRequest *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &start_waste_emptying_request__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +StartWasteEmptyingRequest * + start_waste_emptying_request__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (StartWasteEmptyingRequest *) + protobuf_c_message_unpack (&start_waste_emptying_request__descriptor, + allocator, len, data); +} +void start_waste_emptying_request__free_unpacked + (StartWasteEmptyingRequest *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &start_waste_emptying_request__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +#define start_waste_emptying_request__field_descriptors NULL +#define start_waste_emptying_request__field_indices_by_name NULL +#define start_waste_emptying_request__number_ranges NULL +const ProtobufCMessageDescriptor start_waste_emptying_request__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "", + "", + "", + "", + sizeof(StartWasteEmptyingRequest), + 0, + start_waste_emptying_request__field_descriptors, + start_waste_emptying_request__field_indices_by_name, + 0, start_waste_emptying_request__number_ranges, + (ProtobufCMessageInit) start_waste_emptying_request__init, + NULL,NULL,NULL /* reserved[123] */ +}; diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/StartWasteEmptyingRequest.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/StartWasteEmptyingRequest.pb-c.h new file mode 100644 index 000000000..44a104321 --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/StartWasteEmptyingRequest.pb-c.h @@ -0,0 +1,70 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: StartWasteEmptyingRequest.proto */ + +#ifndef PROTOBUF_C_StartWasteEmptyingRequest_2eproto__INCLUDED +#define PROTOBUF_C_StartWasteEmptyingRequest_2eproto__INCLUDED + +#include + +PROTOBUF_C__BEGIN_DECLS + +#if PROTOBUF_C_VERSION_NUMBER < 1003000 +# error This file was generated by a newer version of protoc-c which is incompatible with your libprotobuf-c headers. Please update your headers. +#elif 1003000 < PROTOBUF_C_MIN_COMPILER_VERSION +# error This file was generated by an older version of protoc-c which is incompatible with your libprotobuf-c headers. Please regenerate this file with a newer version of protoc-c. +#endif + + +typedef struct _StartWasteEmptyingRequest StartWasteEmptyingRequest; + + +/* --- enums --- */ + + +/* --- messages --- */ + +struct _StartWasteEmptyingRequest +{ + ProtobufCMessage base; +}; +#define START_WASTE_EMPTYING_REQUEST__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&start_waste_emptying_request__descriptor) \ + } + + +/* StartWasteEmptyingRequest methods */ +void start_waste_emptying_request__init + (StartWasteEmptyingRequest *message); +size_t start_waste_emptying_request__get_packed_size + (const StartWasteEmptyingRequest *message); +size_t start_waste_emptying_request__pack + (const StartWasteEmptyingRequest *message, + uint8_t *out); +size_t start_waste_emptying_request__pack_to_buffer + (const StartWasteEmptyingRequest *message, + ProtobufCBuffer *buffer); +StartWasteEmptyingRequest * + start_waste_emptying_request__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void start_waste_emptying_request__free_unpacked + (StartWasteEmptyingRequest *message, + ProtobufCAllocator *allocator); +/* --- per-message closures --- */ + +typedef void (*StartWasteEmptyingRequest_Closure) + (const StartWasteEmptyingRequest *message, + void *closure_data); + +/* --- services --- */ + + +/* --- descriptors --- */ + +extern const ProtobufCMessageDescriptor start_waste_emptying_request__descriptor; + +PROTOBUF_C__END_DECLS + + +#endif /* PROTOBUF_C_StartWasteEmptyingRequest_2eproto__INCLUDED */ diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/StartWasteEmptyingResponse.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/StartWasteEmptyingResponse.pb-c.c new file mode 100644 index 000000000..55ca27102 --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/StartWasteEmptyingResponse.pb-c.c @@ -0,0 +1,131 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: StartWasteEmptyingResponse.proto */ + +/* Do not generate deprecated warnings for self */ +#ifndef PROTOBUF_C__NO_DEPRECATED +#define PROTOBUF_C__NO_DEPRECATED +#endif + +#include "StartWasteEmptyingResponse.pb-c.h" +void start_waste_emptying_response__init + (StartWasteEmptyingResponse *message) +{ + static const StartWasteEmptyingResponse init_value = START_WASTE_EMPTYING_RESPONSE__INIT; + *message = init_value; +} +size_t start_waste_emptying_response__get_packed_size + (const StartWasteEmptyingResponse *message) +{ + assert(message->base.descriptor == &start_waste_emptying_response__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t start_waste_emptying_response__pack + (const StartWasteEmptyingResponse *message, + uint8_t *out) +{ + assert(message->base.descriptor == &start_waste_emptying_response__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t start_waste_emptying_response__pack_to_buffer + (const StartWasteEmptyingResponse *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &start_waste_emptying_response__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +StartWasteEmptyingResponse * + start_waste_emptying_response__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (StartWasteEmptyingResponse *) + protobuf_c_message_unpack (&start_waste_emptying_response__descriptor, + allocator, len, data); +} +void start_waste_emptying_response__free_unpacked + (StartWasteEmptyingResponse *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &start_waste_emptying_response__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +static const ProtobufCFieldDescriptor start_waste_emptying_response__field_descriptors[4] = +{ + { + "", + 1, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_MESSAGE, + 0, /* quantifier_offset */ + offsetof(StartWasteEmptyingResponse, cartridge), + &cartridge__descriptor, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "", + 2, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_ENUM, + offsetof(StartWasteEmptyingResponse, has_action), + offsetof(StartWasteEmptyingResponse, action), + &filling_action__descriptor, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "", + 3, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_DOUBLE, + offsetof(StartWasteEmptyingResponse, has_progresspercentage), + offsetof(StartWasteEmptyingResponse, progresspercentage), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "", + 4, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(StartWasteEmptyingResponse, message), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned start_waste_emptying_response__field_indices_by_name[] = { + 1, /* field[1] = Action */ + 0, /* field[0] = Cartridge */ + 3, /* field[3] = Message */ + 2, /* field[2] = ProgressPercentage */ +}; +static const ProtobufCIntRange start_waste_emptying_response__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 4 } +}; +const ProtobufCMessageDescriptor start_waste_emptying_response__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "", + "", + "", + "", + sizeof(StartWasteEmptyingResponse), + 4, + start_waste_emptying_response__field_descriptors, + start_waste_emptying_response__field_indices_by_name, + 1, start_waste_emptying_response__number_ranges, + (ProtobufCMessageInit) start_waste_emptying_response__init, + NULL,NULL,NULL /* reserved[123] */ +}; diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/StartWasteEmptyingResponse.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/StartWasteEmptyingResponse.pb-c.h new file mode 100644 index 000000000..11254b220 --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/StartWasteEmptyingResponse.pb-c.h @@ -0,0 +1,78 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: StartWasteEmptyingResponse.proto */ + +#ifndef PROTOBUF_C_StartWasteEmptyingResponse_2eproto__INCLUDED +#define PROTOBUF_C_StartWasteEmptyingResponse_2eproto__INCLUDED + +#include + +PROTOBUF_C__BEGIN_DECLS + +#if PROTOBUF_C_VERSION_NUMBER < 1003000 +# error This file was generated by a newer version of protoc-c which is incompatible with your libprotobuf-c headers. Please update your headers. +#elif 1003000 < PROTOBUF_C_MIN_COMPILER_VERSION +# error This file was generated by an older version of protoc-c which is incompatible with your libprotobuf-c headers. Please regenerate this file with a newer version of protoc-c. +#endif + +#include "Cartridge.pb-c.h" +#include "FillingAction.pb-c.h" + +typedef struct _StartWasteEmptyingResponse StartWasteEmptyingResponse; + + +/* --- enums --- */ + + +/* --- messages --- */ + +struct _StartWasteEmptyingResponse +{ + ProtobufCMessage base; + Cartridge *cartridge; + protobuf_c_boolean has_action; + FillingAction action; + protobuf_c_boolean has_progresspercentage; + double progresspercentage; + char *message; +}; +#define START_WASTE_EMPTYING_RESPONSE__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&start_waste_emptying_response__descriptor) \ + , NULL, 0, FILLING_ACTION__None, 0, 0, NULL } + + +/* StartWasteEmptyingResponse methods */ +void start_waste_emptying_response__init + (StartWasteEmptyingResponse *message); +size_t start_waste_emptying_response__get_packed_size + (const StartWasteEmptyingResponse *message); +size_t start_waste_emptying_response__pack + (const StartWasteEmptyingResponse *message, + uint8_t *out); +size_t start_waste_emptying_response__pack_to_buffer + (const StartWasteEmptyingResponse *message, + ProtobufCBuffer *buffer); +StartWasteEmptyingResponse * + start_waste_emptying_response__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void start_waste_emptying_response__free_unpacked + (StartWasteEmptyingResponse *message, + ProtobufCAllocator *allocator); +/* --- per-message closures --- */ + +typedef void (*StartWasteEmptyingResponse_Closure) + (const StartWasteEmptyingResponse *message, + void *closure_data); + +/* --- services --- */ + + +/* --- descriptors --- */ + +extern const ProtobufCMessageDescriptor start_waste_emptying_response__descriptor; + +PROTOBUF_C__END_DECLS + + +#endif /* PROTOBUF_C_StartWasteEmptyingResponse_2eproto__INCLUDED */ diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/MachineStatus/MachineStatus.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/MachineStatus/MachineStatus.pb-c.c index ad257ca79..7b73b08b9 100644 --- a/Software/Embedded_SW/Embedded/Communication/PMR/MachineStatus/MachineStatus.pb-c.c +++ b/Software/Embedded_SW/Embedded/Communication/PMR/MachineStatus/MachineStatus.pb-c.c @@ -52,7 +52,7 @@ void machine_status__free_unpacked assert(message->base.descriptor == &machine_status__descriptor); protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); } -static const ProtobufCFieldDescriptor machine_status__field_descriptors[4] = +static const ProtobufCFieldDescriptor machine_status__field_descriptors[6] = { { "", @@ -102,9 +102,35 @@ static const ProtobufCFieldDescriptor machine_status__field_descriptors[4] = 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, + { + "", + 5, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_ENUM, + offsetof(MachineStatus, has_middlecartridgestate), + offsetof(MachineStatus, middlecartridgestate), + &waste_cartridge_state__descriptor, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "", + 6, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_ENUM, + offsetof(MachineStatus, has_lowercartridgestate), + offsetof(MachineStatus, lowercartridgestate), + &waste_cartridge_state__descriptor, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, }; static const unsigned machine_status__field_indices_by_name[] = { 1, /* field[1] = IDSPacksLevels */ + 5, /* field[5] = LowerCartridgeState */ + 4, /* field[4] = MiddleCartridgeState */ 2, /* field[2] = OverallTemperature */ 3, /* field[3] = SpoolState */ 0, /* field[0] = State */ @@ -112,7 +138,7 @@ static const unsigned machine_status__field_indices_by_name[] = { static const ProtobufCIntRange machine_status__number_ranges[1 + 1] = { { 1, 0 }, - { 0, 4 } + { 0, 6 } }; const ProtobufCMessageDescriptor machine_status__descriptor = { @@ -122,7 +148,7 @@ const ProtobufCMessageDescriptor machine_status__descriptor = "", "", sizeof(MachineStatus), - 4, + 6, machine_status__field_descriptors, machine_status__field_indices_by_name, 1, machine_status__number_ranges, diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/MachineStatus/MachineStatus.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/MachineStatus/MachineStatus.pb-c.h index 003fcd09c..a8e12e87f 100644 --- a/Software/Embedded_SW/Embedded/Communication/PMR/MachineStatus/MachineStatus.pb-c.h +++ b/Software/Embedded_SW/Embedded/Communication/PMR/MachineStatus/MachineStatus.pb-c.h @@ -17,6 +17,7 @@ PROTOBUF_C__BEGIN_DECLS #include "MachineState.pb-c.h" #include "IDSPackLevel.pb-c.h" #include "SpoolState.pb-c.h" +#include "WasteCartridgeState.pb-c.h" typedef struct _MachineStatus MachineStatus; @@ -37,10 +38,14 @@ struct _MachineStatus double overalltemperature; protobuf_c_boolean has_spoolstate; SpoolState spoolstate; + protobuf_c_boolean has_middlecartridgestate; + WasteCartridgeState middlecartridgestate; + protobuf_c_boolean has_lowercartridgestate; + WasteCartridgeState lowercartridgestate; }; #define MACHINE_STATUS__INIT \ { PROTOBUF_C_MESSAGE_INIT (&machine_status__descriptor) \ - , 0, MACHINE_STATE__PowerUp, 0,NULL, 0, 0, 0, SPOOL_STATE__Absent } + , 0, MACHINE_STATE__PowerUp, 0,NULL, 0, 0, 0, SPOOL_STATE__Absent, 0, WASTE_CARTRIDGE_STATE__CartAbsent, 0, WASTE_CARTRIDGE_STATE__CartAbsent } /* MachineStatus methods */ diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/MachineStatus/WasteCartridgeState.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/MachineStatus/WasteCartridgeState.pb-c.c new file mode 100644 index 000000000..f179ce199 --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/MachineStatus/WasteCartridgeState.pb-c.c @@ -0,0 +1,43 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: WasteCartridgeState.proto */ + +/* Do not generate deprecated warnings for self */ +#ifndef PROTOBUF_C__NO_DEPRECATED +#define PROTOBUF_C__NO_DEPRECATED +#endif + +#include "WasteCartridgeState.pb-c.h" +static const ProtobufCEnumValue waste_cartridge_state__enum_values_by_number[5] = +{ + { "", "", 0 }, + { "", "", 1 }, + { "", "", 2 }, + { "", "", 3 }, + { "", "", 4 }, +}; +static const ProtobufCIntRange waste_cartridge_state__value_ranges[] = { +{0, 0},{0, 5} +}; +static const ProtobufCEnumValueIndex waste_cartridge_state__enum_values_by_name[5] = +{ + { "", 0 }, + { "", 1 }, + { "", 4 }, + { "", 2 }, + { "", 3 }, +}; +const ProtobufCEnumDescriptor waste_cartridge_state__descriptor = +{ + PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC, + "", + "", + "", + "", + 5, + waste_cartridge_state__enum_values_by_number, + 5, + waste_cartridge_state__enum_values_by_name, + 1, + waste_cartridge_state__value_ranges, + NULL,NULL,NULL,NULL /* reserved[1234] */ +}; diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/MachineStatus/WasteCartridgeState.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/MachineStatus/WasteCartridgeState.pb-c.h new file mode 100644 index 000000000..c100d36d8 --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/MachineStatus/WasteCartridgeState.pb-c.h @@ -0,0 +1,46 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: WasteCartridgeState.proto */ + +#ifndef PROTOBUF_C_WasteCartridgeState_2eproto__INCLUDED +#define PROTOBUF_C_WasteCartridgeState_2eproto__INCLUDED + +#include + +PROTOBUF_C__BEGIN_DECLS + +#if PROTOBUF_C_VERSION_NUMBER < 1003000 +# error This file was generated by a newer version of protoc-c which is incompatible with your libprotobuf-c headers. Please update your headers. +#elif 1003000 < PROTOBUF_C_MIN_COMPILER_VERSION +# error This file was generated by an older version of protoc-c which is incompatible with your libprotobuf-c headers. Please regenerate this file with a newer version of protoc-c. +#endif + + + + +/* --- enums --- */ + +typedef enum _WasteCartridgeState { + WASTE_CARTRIDGE_STATE__CartAbsent = 0, + WASTE_CARTRIDGE_STATE__CartEmpty = 1, + WASTE_CARTRIDGE_STATE__CartFilling = 2, + WASTE_CARTRIDGE_STATE__CartFull = 3, + WASTE_CARTRIDGE_STATE__CartError = 4 + PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(WASTE_CARTRIDGE_STATE) +} WasteCartridgeState; + +/* --- messages --- */ + +/* --- per-message closures --- */ + + +/* --- services --- */ + + +/* --- descriptors --- */ + +extern const ProtobufCEnumDescriptor waste_cartridge_state__descriptor; + +PROTOBUF_C__END_DECLS + + +#endif /* PROTOBUF_C_WasteCartridgeState_2eproto__INCLUDED */ diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Stubs/StubAllHardwareRequest.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/Stubs/StubAllHardwareRequest.pb-c.c new file mode 100644 index 000000000..5334c1193 --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Stubs/StubAllHardwareRequest.pb-c.c @@ -0,0 +1,72 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: StubAllHardwareRequest.proto */ + +/* Do not generate deprecated warnings for self */ +#ifndef PROTOBUF_C__NO_DEPRECATED +#define PROTOBUF_C__NO_DEPRECATED +#endif + +#include "StubAllHardwareRequest.pb-c.h" +void stub_all_hardware_request__init + (StubAllHardwareRequest *message) +{ + static const StubAllHardwareRequest init_value = STUB_ALL_HARDWARE_REQUEST__INIT; + *message = init_value; +} +size_t stub_all_hardware_request__get_packed_size + (const StubAllHardwareRequest *message) +{ + assert(message->base.descriptor == &stub_all_hardware_request__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t stub_all_hardware_request__pack + (const StubAllHardwareRequest *message, + uint8_t *out) +{ + assert(message->base.descriptor == &stub_all_hardware_request__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t stub_all_hardware_request__pack_to_buffer + (const StubAllHardwareRequest *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &stub_all_hardware_request__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +StubAllHardwareRequest * + stub_all_hardware_request__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (StubAllHardwareRequest *) + protobuf_c_message_unpack (&stub_all_hardware_request__descriptor, + allocator, len, data); +} +void stub_all_hardware_request__free_unpacked + (StubAllHardwareRequest *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &stub_all_hardware_request__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +#define stub_all_hardware_request__field_descriptors NULL +#define stub_all_hardware_request__field_indices_by_name NULL +#define stub_all_hardware_request__number_ranges NULL +const ProtobufCMessageDescriptor stub_all_hardware_request__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "", + "", + "", + "", + sizeof(StubAllHardwareRequest), + 0, + stub_all_hardware_request__field_descriptors, + stub_all_hardware_request__field_indices_by_name, + 0, stub_all_hardware_request__number_ranges, + (ProtobufCMessageInit) stub_all_hardware_request__init, + NULL,NULL,NULL /* reserved[123] */ +}; diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Stubs/StubAllHardwareRequest.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/Stubs/StubAllHardwareRequest.pb-c.h new file mode 100644 index 000000000..d22bddaaf --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Stubs/StubAllHardwareRequest.pb-c.h @@ -0,0 +1,70 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: StubAllHardwareRequest.proto */ + +#ifndef PROTOBUF_C_StubAllHardwareRequest_2eproto__INCLUDED +#define PROTOBUF_C_StubAllHardwareRequest_2eproto__INCLUDED + +#include + +PROTOBUF_C__BEGIN_DECLS + +#if PROTOBUF_C_VERSION_NUMBER < 1003000 +# error This file was generated by a newer version of protoc-c which is incompatible with your libprotobuf-c headers. Please update your headers. +#elif 1003000 < PROTOBUF_C_MIN_COMPILER_VERSION +# error This file was generated by an older version of protoc-c which is incompatible with your libprotobuf-c headers. Please regenerate this file with a newer version of protoc-c. +#endif + + +typedef struct _StubAllHardwareRequest StubAllHardwareRequest; + + +/* --- enums --- */ + + +/* --- messages --- */ + +struct _StubAllHardwareRequest +{ + ProtobufCMessage base; +}; +#define STUB_ALL_HARDWARE_REQUEST__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&stub_all_hardware_request__descriptor) \ + } + + +/* StubAllHardwareRequest methods */ +void stub_all_hardware_request__init + (StubAllHardwareRequest *message); +size_t stub_all_hardware_request__get_packed_size + (const StubAllHardwareRequest *message); +size_t stub_all_hardware_request__pack + (const StubAllHardwareRequest *message, + uint8_t *out); +size_t stub_all_hardware_request__pack_to_buffer + (const StubAllHardwareRequest *message, + ProtobufCBuffer *buffer); +StubAllHardwareRequest * + stub_all_hardware_request__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void stub_all_hardware_request__free_unpacked + (StubAllHardwareRequest *message, + ProtobufCAllocator *allocator); +/* --- per-message closures --- */ + +typedef void (*StubAllHardwareRequest_Closure) + (const StubAllHardwareRequest *message, + void *closure_data); + +/* --- services --- */ + + +/* --- descriptors --- */ + +extern const ProtobufCMessageDescriptor stub_all_hardware_request__descriptor; + +PROTOBUF_C__END_DECLS + + +#endif /* PROTOBUF_C_StubAllHardwareRequest_2eproto__INCLUDED */ diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Stubs/StubAllHardwareResponse.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/Stubs/StubAllHardwareResponse.pb-c.c new file mode 100644 index 000000000..898aea50b --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Stubs/StubAllHardwareResponse.pb-c.c @@ -0,0 +1,144 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: StubAllHardwareResponse.proto */ + +/* Do not generate deprecated warnings for self */ +#ifndef PROTOBUF_C__NO_DEPRECATED +#define PROTOBUF_C__NO_DEPRECATED +#endif + +#include "StubAllHardwareResponse.pb-c.h" +void stub_all_hardware_response__init + (StubAllHardwareResponse *message) +{ + static const StubAllHardwareResponse init_value = STUB_ALL_HARDWARE_RESPONSE__INIT; + *message = init_value; +} +size_t stub_all_hardware_response__get_packed_size + (const StubAllHardwareResponse *message) +{ + assert(message->base.descriptor == &stub_all_hardware_response__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t stub_all_hardware_response__pack + (const StubAllHardwareResponse *message, + uint8_t *out) +{ + assert(message->base.descriptor == &stub_all_hardware_response__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t stub_all_hardware_response__pack_to_buffer + (const StubAllHardwareResponse *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &stub_all_hardware_response__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +StubAllHardwareResponse * + stub_all_hardware_response__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (StubAllHardwareResponse *) + protobuf_c_message_unpack (&stub_all_hardware_response__descriptor, + allocator, len, data); +} +void stub_all_hardware_response__free_unpacked + (StubAllHardwareResponse *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &stub_all_hardware_response__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +static const ProtobufCFieldDescriptor stub_all_hardware_response__field_descriptors[5] = +{ + { + "", + 1, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(StubAllHardwareResponse, mcu_serial), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "", + 2, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_MESSAGE, + 0, /* quantifier_offset */ + offsetof(StubAllHardwareResponse, headeeprom), + &stub_head_eeprom_data__descriptor, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "", + 3, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_MESSAGE, + 0, /* quantifier_offset */ + offsetof(StubAllHardwareResponse, whseeprom), + &stub_whs_eeprom_data__descriptor, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "", + 4, + PROTOBUF_C_LABEL_REPEATED, + PROTOBUF_C_TYPE_MESSAGE, + offsetof(StubAllHardwareResponse, n_maincardeepromdata), + offsetof(StubAllHardwareResponse, maincardeepromdata), + &stub_main_card_eeprom_read_response__descriptor, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "", + 5, + PROTOBUF_C_LABEL_REPEATED, + PROTOBUF_C_TYPE_MESSAGE, + offsetof(StubAllHardwareResponse, n_dispensereepromdata), + offsetof(StubAllHardwareResponse, dispensereepromdata), + &stub_dispenser_eeprom_response__descriptor, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned stub_all_hardware_response__field_indices_by_name[] = { + 4, /* field[4] = DispenserEEpromData */ + 1, /* field[1] = HeadEEprom */ + 0, /* field[0] = MCU_Serial */ + 3, /* field[3] = MainCardEEpromData */ + 2, /* field[2] = WhsEEprom */ +}; +static const ProtobufCIntRange stub_all_hardware_response__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 5 } +}; +const ProtobufCMessageDescriptor stub_all_hardware_response__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "", + "", + "", + "", + sizeof(StubAllHardwareResponse), + 5, + stub_all_hardware_response__field_descriptors, + stub_all_hardware_response__field_indices_by_name, + 1, stub_all_hardware_response__number_ranges, + (ProtobufCMessageInit) stub_all_hardware_response__init, + NULL,NULL,NULL /* reserved[123] */ +}; diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Stubs/StubAllHardwareResponse.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/Stubs/StubAllHardwareResponse.pb-c.h new file mode 100644 index 000000000..2678952fa --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Stubs/StubAllHardwareResponse.pb-c.h @@ -0,0 +1,81 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: StubAllHardwareResponse.proto */ + +#ifndef PROTOBUF_C_StubAllHardwareResponse_2eproto__INCLUDED +#define PROTOBUF_C_StubAllHardwareResponse_2eproto__INCLUDED + +#include + +PROTOBUF_C__BEGIN_DECLS + +#if PROTOBUF_C_VERSION_NUMBER < 1003000 +# error This file was generated by a newer version of protoc-c which is incompatible with your libprotobuf-c headers. Please update your headers. +#elif 1003000 < PROTOBUF_C_MIN_COMPILER_VERSION +# error This file was generated by an older version of protoc-c which is incompatible with your libprotobuf-c headers. Please regenerate this file with a newer version of protoc-c. +#endif + +#include "StubHeadEEpromData.pb-c.h" +#include "StubWhsEEpromData.pb-c.h" +#include "StubDispenserEEpromResponse.pb-c.h" +#include "StubMainCardEEpromReadResponse.pb-c.h" + +typedef struct _StubAllHardwareResponse StubAllHardwareResponse; + + +/* --- enums --- */ + + +/* --- messages --- */ + +struct _StubAllHardwareResponse +{ + ProtobufCMessage base; + char *mcu_serial; + StubHeadEEpromData *headeeprom; + StubWhsEEpromData *whseeprom; + size_t n_maincardeepromdata; + StubMainCardEEpromReadResponse **maincardeepromdata; + size_t n_dispensereepromdata; + StubDispenserEEpromResponse **dispensereepromdata; +}; +#define STUB_ALL_HARDWARE_RESPONSE__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&stub_all_hardware_response__descriptor) \ + , NULL, NULL, NULL, 0,NULL, 0,NULL } + + +/* StubAllHardwareResponse methods */ +void stub_all_hardware_response__init + (StubAllHardwareResponse *message); +size_t stub_all_hardware_response__get_packed_size + (const StubAllHardwareResponse *message); +size_t stub_all_hardware_response__pack + (const StubAllHardwareResponse *message, + uint8_t *out); +size_t stub_all_hardware_response__pack_to_buffer + (const StubAllHardwareResponse *message, + ProtobufCBuffer *buffer); +StubAllHardwareResponse * + stub_all_hardware_response__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void stub_all_hardware_response__free_unpacked + (StubAllHardwareResponse *message, + ProtobufCAllocator *allocator); +/* --- per-message closures --- */ + +typedef void (*StubAllHardwareResponse_Closure) + (const StubAllHardwareResponse *message, + void *closure_data); + +/* --- services --- */ + + +/* --- descriptors --- */ + +extern const ProtobufCMessageDescriptor stub_all_hardware_response__descriptor; + +PROTOBUF_C__END_DECLS + + +#endif /* PROTOBUF_C_StubAllHardwareResponse_2eproto__INCLUDED */ diff --git a/Software/Embedded_SW/Embedded/Drivers/Valves/Valve.c b/Software/Embedded_SW/Embedded/Drivers/Valves/Valve.c index 2ae3da453..841a8d1da 100644 --- a/Software/Embedded_SW/Embedded/Drivers/Valves/Valve.c +++ b/Software/Embedded_SW/Embedded/Drivers/Valves/Valve.c @@ -148,6 +148,7 @@ uint32_t ValveCallback(uint32_t deviceID, uint32_t ReadValue) MidtankMitigationCounter[deviceID] = 0; } } + return OK; } void Valve_Command(Valves_t Valve_Id) //1 - OPEN, 0 - CLOSE diff --git a/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c b/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c index 120df71df..de45cacaa 100644 --- a/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c +++ b/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c @@ -36,6 +36,7 @@ #include "modules/thread/thread_ex.h" #include "modules/heaters/heaters_ex.h" #include "modules/ids/ids_ex.h" +#include "modules/waste/waste_ex.h" #include #include #include diff --git a/Software/Embedded_SW/Embedded/Modules/General/MachineStatus.c b/Software/Embedded_SW/Embedded/Modules/General/MachineStatus.c index 9297d3bb8..b9bcc1624 100644 --- a/Software/Embedded_SW/Embedded/Modules/General/MachineStatus.c +++ b/Software/Embedded_SW/Embedded/Modules/General/MachineStatus.c @@ -27,7 +27,9 @@ #include "StateMachines/Initialization/InitSequence.h" #include "Modules/General/MachineStatus.h" +#include "Modules/AlarmHandling/AlarmHandling.h" #include "Modules/Control/MillisecTask.h" +#include "modules/waste/waste_ex.h" #include "modules/ids/ids_ex.h" MachineState StoredMachineStatus = MACHINE_STATE__PowerUp; @@ -78,6 +80,7 @@ int MachineUpdateResponseFunc(void) int1valid = false; if((internaltemp2<=MINIMUM_HEATER_READ*100)||(MAXIMUM_HEATER_READ*100<=internaltemp2)) int2valid = false; + MachineStatus.has_overalltemperature = true; if ((int2valid == true)&&(int1valid == true)) { usetemp = (max(internaltemp1,internaltemp2))/100; @@ -89,17 +92,19 @@ int MachineUpdateResponseFunc(void) } else { - AlarmHandlingSetAlarm(EVENT_TYPE__TEMPERATURE_MEASUREMENT_ERROR, true); + //AlarmHandlingSetAlarm(EVENT_TYPE__TEMPERATURE_MEASUREMENT_ERROR, true); temp_measure_alarm = true; if ((int2valid == false)&&(int1valid == true)) usetemp = internaltemp1/100; else if ((int2valid == false)&&(int1valid == false)) + { + MachineStatus.has_overalltemperature = FALSE; usetemp = 0; + } else if ((int1valid == false)&&(int2valid == true)) usetemp = internaltemp2/100; } - MachineStatus.has_overalltemperature = true; if (FPGA_Read_limit_Switches(GPI_SW_SPOOL_EXISTS)==LIMIT) @@ -133,7 +138,47 @@ int MachineUpdateResponseFunc(void) } else return ERROR; - + MachineStatus.has_middlecartridgestate = true; + switch (cartGetState(WasteCartridge_middle)) + { + case CartridgeStateOUT: + MachineStatus.middlecartridgestate = WASTE_CARTRIDGE_STATE__CartAbsent; + break; + case CartridgeStateIN: + case CartridgeStateSELECTED: + MachineStatus.middlecartridgestate = WASTE_CARTRIDGE_STATE__CartEmpty; + break; + case CartridgeStateACTIVE: + MachineStatus.middlecartridgestate = WASTE_CARTRIDGE_STATE__CartFilling; + break; + case CartridgeStateFULL: + MachineStatus.middlecartridgestate = WASTE_CARTRIDGE_STATE__CartFull; + break; + default: + MachineStatus.middlecartridgestate = WASTE_CARTRIDGE_STATE__CartAbsent; + break; + } + MachineStatus.has_lowercartridgestate = true; + MachineStatus.lowercartridgestate = WASTE_CARTRIDGE_STATE__CartAbsent; + switch (cartGetState(WasteCartridge_lower)) + { + case CartridgeStateOUT: + MachineStatus.lowercartridgestate = WASTE_CARTRIDGE_STATE__CartAbsent; + break; + case CartridgeStateIN: + case CartridgeStateSELECTED: + MachineStatus.lowercartridgestate = WASTE_CARTRIDGE_STATE__CartEmpty; + break; + case CartridgeStateACTIVE: + MachineStatus.lowercartridgestate = WASTE_CARTRIDGE_STATE__CartFilling; + break; + case CartridgeStateFULL: + MachineStatus.lowercartridgestate = WASTE_CARTRIDGE_STATE__CartFull; + break; + default: + MachineStatus.lowercartridgestate = WASTE_CARTRIDGE_STATE__CartAbsent; + break; + } responseContainer = /*MachineUpdate*/createContainer(MESSAGE_TYPE__StartMachineStatusUpdateResponse, MachineUpdateToken, false, &response, &start_machine_status_update_response__pack, &start_machine_status_update_response__get_packed_size); diff --git a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_ex.h b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_ex.h index 6d50eb926..e85694c48 100644 --- a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_ex.h +++ b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_ex.h @@ -47,6 +47,7 @@ double PressureSensorGetPressure(uint8_t SensorId); int HeadBlowersGetRPM(uint8_t fanId); double PressureSensorInit(); void HeadBlowersInit(); +uint32_t HeadBlowerPidRequestMessage(void* request, int BlowerId); void HeadBlowersCfg(); void HeadBlowersControlLoop (); uint32_t HeadBlowerCommandRequestMessage(int blowerId, float flow); diff --git a/Software/Embedded_SW/Embedded/Modules/IFS/ifs.c b/Software/Embedded_SW/Embedded/Modules/IFS/ifs.c index 747df1a61..abad051cb 100644 --- a/Software/Embedded_SW/Embedded/Modules/IFS/ifs.c +++ b/Software/Embedded_SW/Embedded/Modules/IFS/ifs.c @@ -11,10 +11,14 @@ #include #include "PMR/Diagnostics/CartridgeSlot.pb-c.h" #include "PMR/Diagnostics/CartridgeTagContent.pb-c.h" +#include "PMR/Diagnostics/StartInkFillingRequest.pb-c.h" +#include "PMR/Diagnostics/StartInkFillingResponse.pb-c.h" +#include "PMR/Diagnostics/FillingAction.pb-c.h" #include #include "drivers/FPGA/FPGA_GPIO/FPGA_GPIO.h"//#include "FPGA_GPIO.h" // use for FPGA IO #include "drivers/I2C_Communication/ADC_MUX/ADC_MUX.h" #include "StateMachines/Initialization/PowerOffSequence.h" +#include #include "include.h" #include "Modules/IDS/ids_ex.h" @@ -229,7 +233,54 @@ bool CartridgeValidationResponseFunc(MessageContainer* requestContainer) } return OK; } +char InkFillingToken[36+1] = {0}; +uint32_t InkFillingUpdate(POWER_OFF_STAGES_ENUM stage) +{ + uint32_t status = NOT_SUPPORTED; + MessageContainer responseContainer; + + StartInkFillingResponse response = START_INK_FILLING_RESPONSE__INIT; + Cartridge Cartridge = CARTRIDGE__INIT; + response.action = FILLING_ACTION__None; + response.has_action = true; + response.cartridge = LoadCartridgeData(CART_1,&Cartridge); + + response.cartridge = NULL; + response.has_progresspercentage = true; + response.progresspercentage = 0.0; + response.message = NULL; + + responseContainer = createContainer(MESSAGE_TYPE__StartInkFillingResponse, InkFillingToken, false, &response, &start_ink_filling_response__pack, &start_ink_filling_response__get_packed_size); + responseContainer.has_continuous = true; + responseContainer.continuous = true; + uint8_t* container_buffer = my_malloc(message_container__get_packed_size(&responseContainer)); + size_t container_size = message_container__pack(&responseContainer, container_buffer); + my_free(responseContainer.data.data); + //USBCDCD_sendData(container_buffer, container_size,10); + + SendChars((char*)container_buffer, container_size); + //MessageContainer responseContainer; + + return status; +} + +uint32_t StartInkFillingRequestFunc(MessageContainer* requestContainer) +{ + uint32_t status = NOT_SUPPORTED; + //MessageContainer responseContainer; +// MachineUpdateInitParams InitParams; + + Report("StartInkFillingRequestFunc",__FILE__,__LINE__,(int)0,RpWarning,(int)0,0); + StartInkFillingRequest* request = start_ink_filling_request__unpack(NULL, requestContainer->data.len, requestContainer->data.data); + ustrncpy (InkFillingToken, requestContainer->token,36); + + InkFillingUpdate(POWER_OFF_INIT); + start_ink_filling_request__free_unpacked(request,NULL); + return status; +// case MESSAGE_TYPE__StartWasteEmptyingRequest: + +} void ResponseDemo(int MidtankId) { inkAuthenticationPass = true; diff --git a/Software/Embedded_SW/Embedded/Modules/IFS/ifs.h b/Software/Embedded_SW/Embedded/Modules/IFS/ifs.h index 0f95fb2e2..dec1544ec 100644 --- a/Software/Embedded_SW/Embedded/Modules/IFS/ifs.h +++ b/Software/Embedded_SW/Embedded/Modules/IFS/ifs.h @@ -28,5 +28,6 @@ bool IFS_MidTankFilling(void); MidTank_t IFS_MidTankIsActive(void); bool IFS_CartridgeLowerPresent(); bool CartridgeValidationResponseFunc(MessageContainer* requestContainer); +uint32_t StartInkFillingRequestFunc(MessageContainer* requestContainer); #endif /* MODULES_IFS_IFS_H_ */ diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c b/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c index 6edc5b3f2..d0d2c1ef7 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c @@ -16,7 +16,7 @@ #include "Modules/Control/control.h" #include "Modules/General/process.h" #include "Modules/control/pidalgo.h" - +#include "Modules/AlarmHandling/AlarmHandling.h" #include "Modules/heaters/heaters_ex.h" #include "Modules/General/buttons.h" #include "StateMachines/Initialization/InitSequence.h" diff --git a/Software/Embedded_SW/Embedded/Modules/Waste/Waste_ex.h b/Software/Embedded_SW/Embedded/Modules/Waste/Waste_ex.h index 0a7534635..38e3236cc 100644 --- a/Software/Embedded_SW/Embedded/Modules/Waste/Waste_ex.h +++ b/Software/Embedded_SW/Embedded/Modules/Waste/Waste_ex.h @@ -47,6 +47,8 @@ bool WHS_IsEmptying(); uint32_t Waste_CheckState(void); uint32_t Waste_Prepare(void); bool WHS_IsVocPpmOverAlarmLimit(); +uint32_t StartWasteEmptyingRequestFunc(MessageContainer* requestContainer); + extern bool ReadingVocEverySec; diff --git a/Software/Embedded_SW/Embedded/Modules/Waste/Waste_maint.c b/Software/Embedded_SW/Embedded/Modules/Waste/Waste_maint.c index 84609035a..6d338cbf7 100644 --- a/Software/Embedded_SW/Embedded/Modules/Waste/Waste_maint.c +++ b/Software/Embedded_SW/Embedded/Modules/Waste/Waste_maint.c @@ -6,13 +6,17 @@ #include "drivers/Valves/Valve.h" #include "Common/report/report.h" #include "Modules/Waste/Waste_ex.h" +#include "modules/heaters/heaters_ex.h" #include #include "Drivers/I2C_Communication/RFID_NFC/logi-tag/LT_RFID.h" #include #include "Drivers/I2C_Communication/RFID_NFC/NFC.h" -//#include +#include #include +#include "PMR/Diagnostics/FillingAction.pb-c.h" +#include "PMR/Diagnostics/StartWasteEmptyingRequest.pb-c.h" +#include "PMR/Diagnostics/StartWasteEmptyingResponse.pb-c.h" #include "Modules/AlarmHandling/AlarmHandling.h" #include "StateMachines/Initialization/PowerOffSequence.h" #include "drivers/I2C_Communication/ADC_MUX/ADC_MUX.h" @@ -500,6 +504,53 @@ void Waste_StateMachine(void) Report("wrong state", __FILE__, WasteTankState, 0, RpMessage, SelectedCard, 0); break; } +} +char WasteEmptyingToken[36+1] = {0}; +uint32_t WasteEmptyingUpdate(POWER_OFF_STAGES_ENUM stage) +{ + uint32_t status = NOT_SUPPORTED; + MessageContainer responseContainer; + + StartWasteEmptyingResponse response = START_WASTE_EMPTYING_RESPONSE__INIT; + response.action = FILLING_ACTION__None; + response.has_action = true; + //response.cartridge = LoadCartridgeData(); response.cartridge = LoadCartridgeData(); + + response.cartridge = NULL; + response.has_progresspercentage = true; + response.progresspercentage = 0.0; + response.message = NULL; + + responseContainer = createContainer(MESSAGE_TYPE__StartWasteEmptyingResponse, WasteEmptyingToken, false, &response, &start_waste_emptying_response__pack, &start_waste_emptying_response__get_packed_size); + responseContainer.has_continuous = true; + responseContainer.continuous = true; + uint8_t* container_buffer = my_malloc(message_container__get_packed_size(&responseContainer)); + size_t container_size = message_container__pack(&responseContainer, container_buffer); + my_free(responseContainer.data.data); + //USBCDCD_sendData(container_buffer, container_size,10); + + SendChars((char*)container_buffer, container_size); + //MessageContainer responseContainer; + + return status; +} + +uint32_t StartWasteEmptyingRequestFunc(MessageContainer* requestContainer) +{ + uint32_t status = NOT_SUPPORTED; + //MessageContainer responseContainer; + +// MachineUpdateInitParams InitParams; + + Report("StartWasteEmptyingRequestFunc",__FILE__,__LINE__,(int)0,RpWarning,(int)0,0); + StartWasteEmptyingRequest* request = start_waste_emptying_request__unpack(NULL, requestContainer->data.len, requestContainer->data.data); + ustrncpy (WasteEmptyingToken, requestContainer->token,36); + + WasteEmptyingUpdate(POWER_OFF_INIT); + start_waste_emptying_request__free_unpacked(request,NULL); + return status; +// case MESSAGE_TYPE__StartWasteEmptyingRequest: + } uint32_t Waste_CheckState(void) { @@ -572,6 +623,7 @@ uint32_t Waste_PrepareCallbak(uint32_t IfIndex, uint32_t ReadValue) PrepareReady(Module_Waste,ModuleDone); } Report("Module waste prepare", __FILE__, __LINE__, headready, RpMessage, whsready, 0); + return OK; } uint32_t Waste_Prepare(void) { @@ -581,6 +633,7 @@ uint32_t Waste_Prepare(void) //check that blowers are within 10% of designated flow: WHS, head blowers WasteReadyControlId = AddControlCallback("Cartridge Cover Door", Waste_PrepareCallbak, eOneSecond, TemplateDataReadCBFunction, 0, 0, 0); Report("Module waste prepare", __FILE__, __LINE__, Head_Type, RpMessage, WHS_Type, 0); + return OK; } bool WHS_IsVocPpmOverAlarmLimit() diff --git a/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerOffSequence.c b/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerOffSequence.c index 0a980159d..8f6f2a781 100644 --- a/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerOffSequence.c +++ b/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerOffSequence.c @@ -41,6 +41,7 @@ #include "InitSequence.h" #include "PowerOffSequence.h" #include "modules/waste/waste_ex.h" +#include "modules/ifs/ifs.h" /* typedef enum { diff --git a/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c b/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c index 86c8ef7da..235854b7a 100644 --- a/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c +++ b/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c @@ -55,6 +55,7 @@ #include "Modules/General/process.h" #include "modules/Diagnostics/Diagnostics.h" +#include "modules/waste/waste_ex.h" #include "PMR/Stubs/StubJobRequest.pb-c.h" #include "PMR/Stubs/StubJobResponse.pb-c.h" diff --git a/Software/PMR/Messages/Common/MessageType.proto b/Software/PMR/Messages/Common/MessageType.proto index 4f2147b02..593dcf547 100644 --- a/Software/PMR/Messages/Common/MessageType.proto +++ b/Software/PMR/Messages/Common/MessageType.proto @@ -123,6 +123,8 @@ enum MessageType StubMainCardEEpromReadResponse = 110; StubMainCardEEpromWriteRequest = 111; StubMainCardEEpromWriteResponse = 112; + StubHeadEEpromRequest = 113; + StubHeadEEpromResponse = 114; //------------------------------------ @@ -198,7 +200,10 @@ enum MessageType StopCartridgesUpdateResponse = 2043; CartridgeValidationRequest = 2044; CartridgeValidationResponse = 2045; - + StartWasteEmptyingRequest = 2046; + StartWasteEmptyingResponse = 2047; + StartInkFillingRequest = 2048; + StartInkFillingResponse = 2049; //Printing JobRequest = 3000; diff --git a/Software/PMR/Messages/Diagnostics/StartInkFillingRequest.proto b/Software/PMR/Messages/Diagnostics/StartInkFillingRequest.proto index ddb174ca4..9e574bf7f 100644 --- a/Software/PMR/Messages/Diagnostics/StartInkFillingRequest.proto +++ b/Software/PMR/Messages/Diagnostics/StartInkFillingRequest.proto @@ -4,6 +4,6 @@ syntax = "proto3"; package Tango.PMR.Diagnostics; option java_package = "com.twine.tango.pmr.diagnostics"; -message InkFillingRequest +message StartInkFillingRequest { } \ No newline at end of file diff --git a/Software/PMR/Messages/Diagnostics/StartInkFillingResponse.proto b/Software/PMR/Messages/Diagnostics/StartInkFillingResponse.proto index 877d82036..735275bdd 100644 --- a/Software/PMR/Messages/Diagnostics/StartInkFillingResponse.proto +++ b/Software/PMR/Messages/Diagnostics/StartInkFillingResponse.proto @@ -6,7 +6,7 @@ import "FillingAction.proto"; package Tango.PMR.Diagnostics; option java_package = "com.twine.tango.pmr.diagnostics"; -message FillingActionResponse +message StartInkFillingResponse { Cartridge Cartridge = 1; FillingAction Action = 2; diff --git a/Software/PMR/Messages/Diagnostics/StartWasteEmptyingRequest.proto b/Software/PMR/Messages/Diagnostics/StartWasteEmptyingRequest.proto index 18b366e7c..e33afd08d 100644 --- a/Software/PMR/Messages/Diagnostics/StartWasteEmptyingRequest.proto +++ b/Software/PMR/Messages/Diagnostics/StartWasteEmptyingRequest.proto @@ -3,6 +3,6 @@ syntax = "proto3"; package Tango.PMR.Diagnostics; option java_package = "com.twine.tango.pmr.diagnostics"; -message WasteEmptyingRequest +message StartWasteEmptyingRequest { } \ No newline at end of file diff --git a/Software/PMR/Messages/Diagnostics/StartWasteEmptyingResponse.proto b/Software/PMR/Messages/Diagnostics/StartWasteEmptyingResponse.proto index 877d82036..caa7b0a4f 100644 --- a/Software/PMR/Messages/Diagnostics/StartWasteEmptyingResponse.proto +++ b/Software/PMR/Messages/Diagnostics/StartWasteEmptyingResponse.proto @@ -6,7 +6,7 @@ import "FillingAction.proto"; package Tango.PMR.Diagnostics; option java_package = "com.twine.tango.pmr.diagnostics"; -message FillingActionResponse +message StartWasteEmptyingResponse { Cartridge Cartridge = 1; FillingAction Action = 2; -- cgit v1.3.1