diff --git a/protos/farm_ng/canbus/tool_control.proto b/protos/farm_ng/canbus/tool_control.proto index 7e2084c..9a10a3a 100644 --- a/protos/farm_ng/canbus/tool_control.proto +++ b/protos/farm_ng/canbus/tool_control.proto @@ -38,8 +38,8 @@ enum PtoCommandType { // Enum for commanding BugDispenser device state enum BugDispenserState { BUG_DISPENSER_UNKNOW = 0; // Default value indicating unknown state - BUG_DISPENSER_ACTIVE = 1; // Activate the bug dispenser - BUG_DISPENSER_STOPPED = 2; // Stop the bug dispenser + BUG_DISPENSER_ACTIVE = 1; // The bug dispenser is active + BUG_DISPENSER_STOPPED = 2; // The bug dispenser is stopped } // Tool command replies, decoded from AmigaTpdo1 CAN messages @@ -81,9 +81,9 @@ message PtoCommand { // For commanding a BugDispenser device message BugDispenserCommand { - uint32 id = 1; // Bug dispenser ID (e.g., 0x0 - 0x2) + uint32 id = 1; // Bug dispenser ID (e.g., 0x20 - 0x22) float rate = 2; // Dispensing rate in meters between drops - BugDispenserState state = 3; // Dispensing state + BugDispenserState state = 3; // Bug dispenser state (UNKNOWN, ACTIVE, STOPPED) } @@ -139,11 +139,11 @@ message PtoStatus { // Message to receive bug dispenser status message BugDispenserStatus { double stamp = 1; // Stamp of the bug dispenser RawCanbusMessage event - uint32 id = 2; // Bug dispenser ID (e.g., 0x0 - 0x2) - BugDispenserState state = 3; // UNKNOWN, STOPPED, ACTIVE + uint32 id = 2; // Bug dispenser ID (e.g., 0x20 - 0x22) + BugDispenserState state = 3; // UNKNOWN, ACTIVE, STOPPED float rate = 4; // Dispensing rate in meters between drops - bool bug_dispenser_empty = 5; // Whether the hopper is empty - float volume_dispensed = 6; // Volume of product dispensed + bool bug_dispenser_is_dispensing = 5; // Whether the hopper is dispensing + float volume_dispensed = 6; // Volume of product dispensed in liters } diff --git a/py/farm_ng/canbus/packet.py b/py/farm_ng/canbus/packet.py index 5c47678..4905fd7 100644 --- a/py/farm_ng/canbus/packet.py +++ b/py/farm_ng/canbus/packet.py @@ -528,7 +528,7 @@ def decode(self, data): def __str__(self): """Returns a string representation of the class.""" - return f"BugDispenserRpdo1: Rates: {self.rate0}, {self.rate1}, {self.rate2}" + return f"BugDispenserCommand: Rates: {self.rate0}, {self.rate1}, {self.rate2}" def to_raw_canbus_message(self) -> canbus_pb2.RawCanbusMessage: """Packs the class data into a canbus_pb2.RawCanbusMessage.""" @@ -598,6 +598,6 @@ def from_raw_canbus_message(cls, message: canbus_pb2.RawCanbusMessage) -> BugDis def __str__(self): """Returns a string representation of the class.""" return ( - f"BugDispenserTpdo1: Rates: {self.rate0}, {self.rate1}, {self.rate2} " + f"BugDispenserState: Rates: {self.rate0}, {self.rate1}, {self.rate2} " f"| Counters: {self.counter0}, {self.counter1}, {self.counter2}" )