Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of LG by
Diff: DeviceUserProtocolEncoder.c
- Revision:
- 175:0f86eedd511c
- Parent:
- 167:bedc0a9d559a
- Child:
- 178:672ef279c8e0
--- a/DeviceUserProtocolEncoder.c Sun Jun 19 03:54:35 2016 +0000
+++ b/DeviceUserProtocolEncoder.c Sun Jun 26 10:16:39 2016 +0000
@@ -36,7 +36,7 @@
//case D_PERIOD_W: break;
case MAINTENANCE: EncodeStart(); EncodeAddress(); Encode8(0); Encode8(0); EncodeMessage(); EncodeCRC(); break;
//case M0_BASIC: break;
- //case M0_RATE: break;
+ case M0_RATE: EncodeMRate(); break;
case M0_GPH_W: EncodeStart(); EncodeAddress(); Encode8(M0_GPH_W >> 8); Encode8(0); EncodeCRC(); break;
case H_PARAM8_W:
case H_PARAM8_R:
@@ -140,4 +140,15 @@
void EncodeValidBINS(void) {
//TODO
+}
+
+void EncodeMRate(void) {
+ EncodeStart();
+ EncodeAddress();
+ Encode16((int16_t)device.counters.meander.state.a);
+ Encode16((int16_t)device.counters.meander.state.b);
+
+ //TODO:
+
+ EncodeCRC();
}
\ No newline at end of file
