avr: implement gv [get value] and sv [set value] commands

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

View File

@ -230,6 +230,11 @@ void ctrlCmdGet(uint8_t cmd)
ctrlWriteCharToTxBuffer(phy_to_log[i]); ctrlWriteCharToTxBuffer(phy_to_log[i]);
} }
break; break;
case 'v':
ctrlReadCharFromRxBuffer(&i);
ctrlWriteLongToTxBuffer(sensor[i].value);
break;
} }
} }
@ -243,6 +248,10 @@ void ctrlCmdSet(uint8_t cmd)
ctrlReadCharFromRxBuffer(&phy_to_log[i]); ctrlReadCharFromRxBuffer(&phy_to_log[i]);
} }
break; break;
case 'v':
ctrlReadCharFromRxBuffer(&i);
ctrlReadLongFromRxBuffer((uint32_t *)&sensor[i].value);
break;
} }
} }