avr: implement gm [get meterconst] and sm [set meterconst] commands

This commit is contained in:
Bart Van Der Meerssche 2010-12-27 23:12:52 +01:00
parent 80ae936348
commit 3d1b67f221
1 changed files with 9 additions and 0 deletions

View File

@ -235,6 +235,11 @@ void ctrlCmdGet(uint8_t cmd)
ctrlReadCharFromRxBuffer(&i);
ctrlWriteLongToTxBuffer(sensor[i].value);
break;
case 'm':
ctrlReadCharFromRxBuffer(&i);
ctrlWriteShortToTxBuffer(sensor[i].meterconst);
break;
}
}
@ -252,6 +257,10 @@ void ctrlCmdSet(uint8_t cmd)
ctrlReadCharFromRxBuffer(&i);
ctrlReadLongFromRxBuffer((uint32_t *)&sensor[i].value);
break;
case 'm':
ctrlReadCharFromRxBuffer(&i);
ctrlReadShortFromRxBuffer((uint16_t *)&sensor[i].meterconst);
break;
}
}