Ausgabe des aktuell einsgestellten Soll-Stroms und Ausgabe fomratierung
This commit is contained in:
parent
8dd488eb28
commit
50ea6e4a74
@ -94,11 +94,15 @@ int main (void)
|
||||
uint16_t set_solltrom(CLI_OutFunction pfvOutFunction, char *acCommands[], uint16_t u16ArgCount)
|
||||
{
|
||||
char buf[40];
|
||||
uint32_t in = strtoul(acCommands[0], NULL, 10);
|
||||
uint32_t cur = i_soll;
|
||||
snprintf(buf, sizeof(buf), "\r\nAktueller Soll-Strom: %" PRIu32 ", Neu: %" PRIu32, cur, in);
|
||||
pfvOutFunction(buf);
|
||||
int32_t pos = snprintf(buf, sizeof(buf), "\r\nAktueller Soll-Strom: %" PRIu32, cur);
|
||||
if(u16ArgCount == 1U)
|
||||
{
|
||||
uint32_t in = strtoul(acCommands[0], NULL, 10);
|
||||
snprintf(&buf[pos], sizeof(buf) - pos, " Neu: %" PRIu32, in);
|
||||
i_soll = in;
|
||||
}
|
||||
pfvOutFunction(buf);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user