Ausgabe des aktuell einsgestellten Soll-Stroms und Ausgabe fomratierung
This commit is contained in:
		@@ -94,11 +94,15 @@ int main (void)
 | 
				
			|||||||
uint16_t set_solltrom(CLI_OutFunction pfvOutFunction, char *acCommands[], uint16_t u16ArgCount)
 | 
					uint16_t set_solltrom(CLI_OutFunction pfvOutFunction, char *acCommands[], uint16_t u16ArgCount)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  char buf[40];
 | 
					  char buf[40];
 | 
				
			||||||
  uint32_t in = strtoul(acCommands[0], NULL, 10);
 | 
					 | 
				
			||||||
  uint32_t cur = i_soll;
 | 
					  uint32_t cur = i_soll;
 | 
				
			||||||
  snprintf(buf, sizeof(buf), "\r\nAktueller Soll-Strom: %" PRIu32 ", Neu: %" PRIu32, cur, in);
 | 
					  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);
 | 
					  pfvOutFunction(buf);
 | 
				
			||||||
  i_soll = in;
 | 
					 | 
				
			||||||
  return 0;
 | 
					  return 0;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user