avr: implement gm [get meterconst] and sm [set meterconst] commands
This commit is contained in:
parent
80ae936348
commit
3d1b67f221
|
@ -235,6 +235,11 @@ void ctrlCmdGet(uint8_t cmd)
|
||||||
ctrlReadCharFromRxBuffer(&i);
|
ctrlReadCharFromRxBuffer(&i);
|
||||||
ctrlWriteLongToTxBuffer(sensor[i].value);
|
ctrlWriteLongToTxBuffer(sensor[i].value);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'm':
|
||||||
|
ctrlReadCharFromRxBuffer(&i);
|
||||||
|
ctrlWriteShortToTxBuffer(sensor[i].meterconst);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -252,6 +257,10 @@ void ctrlCmdSet(uint8_t cmd)
|
||||||
ctrlReadCharFromRxBuffer(&i);
|
ctrlReadCharFromRxBuffer(&i);
|
||||||
ctrlReadLongFromRxBuffer((uint32_t *)&sensor[i].value);
|
ctrlReadLongFromRxBuffer((uint32_t *)&sensor[i].value);
|
||||||
break;
|
break;
|
||||||
|
case 'm':
|
||||||
|
ctrlReadCharFromRxBuffer(&i);
|
||||||
|
ctrlReadShortFromRxBuffer((uint16_t *)&sensor[i].meterconst);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue