mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
WireDecoder: Add overloads for StringValue and Value.
Change-Id: Idb41fd16fec8efc8b984c1a9b4d225829d16e344 StringValue: Add comparison operators.
This commit is contained in:
@@ -102,6 +102,7 @@ bool WireDecoder::ReadType(NT_Type* type) {
|
||||
*type = NT_RPC;
|
||||
break;
|
||||
default:
|
||||
*type = NT_UNASSIGNED;
|
||||
m_error = "unrecognized value type";
|
||||
return false;
|
||||
}
|
||||
@@ -109,8 +110,6 @@ bool WireDecoder::ReadType(NT_Type* type) {
|
||||
}
|
||||
|
||||
bool WireDecoder::ReadValue(NT_Type type, NT_Value* value) {
|
||||
value->type = type;
|
||||
value->last_change = 0;
|
||||
switch (type) {
|
||||
case NT_BOOLEAN: {
|
||||
unsigned int v;
|
||||
@@ -188,6 +187,8 @@ bool WireDecoder::ReadValue(NT_Type type, NT_Value* value) {
|
||||
m_error = "invalid type when trying to read value";
|
||||
return false;
|
||||
}
|
||||
value->type = type;
|
||||
value->last_change = 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user