Bug in CAN output corrected.
This commit is contained in:
+2
-2
@@ -50,7 +50,7 @@ void can_pub_msg(DataObject_t data_obj)
|
||||
msg.type = CANData;
|
||||
|
||||
msg.id = msg_priority << 26
|
||||
| (1U << 24) | (1U << 24) // identify as publication message
|
||||
| (1U << 24) | (1U << 25) // identify as publication message
|
||||
| data_obj.id << 8
|
||||
| can_node_id;
|
||||
|
||||
@@ -102,7 +102,7 @@ void can_pub_msg(DataObject_t data_obj)
|
||||
msg.data[2] = exponent_abs;
|
||||
}
|
||||
else if (data_obj.exponent < 0 && data_obj.exponent > -24) {
|
||||
msg.data[2] = (exponent_abs - 1) & 0x20; // negative uint8
|
||||
msg.data[2] = (exponent_abs - 1) | 0x20; // negative uint8
|
||||
}
|
||||
|
||||
// value as positive or negative uint32
|
||||
|
||||
Reference in New Issue
Block a user