Romain Ame
/
Timer71pt
Fork de Timer après le match à 61 points
Fork of Timer by
Diff: AX12/AX12.cpp
- Revision:
- 50:2dea82393beb
- Parent:
- 41:b5a2fbc20beb
- Child:
- 51:1056dd73a748
diff -r 5e2f7323f280 -r 2dea82393beb AX12/AX12.cpp --- a/AX12/AX12.cpp Thu Apr 28 08:24:02 2016 +0000 +++ b/AX12/AX12.cpp Mon May 02 08:35:56 2016 +0000 @@ -294,6 +294,12 @@ return(volts); } +float AX12::getLoad (void) { + char data[2]; + int ErrorCode = read(_ID, AX12_REG_VOLTS, 2, data); + float volts = data[0]/10.0; + return(volts); +} int AX12::read(int ID, int start, int bytes, char* data) { @@ -369,7 +375,7 @@ // Wait for the bytes to be transmitted wait (0.00002); - + // Skip if the read was to the broadcast address if (_ID != 0xFE) {