avr: implement gv [get value] and sv [set value] commands
This commit is contained in:
parent
98496e442d
commit
80ae936348
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue