Advertisement
hidromotic

G02_IV

Apr 11th, 2019
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. //G02_IV
  2. void ActualizaVisorTiempo(void)
  3. {
  4. char cadena[5];
  5. char cadena2[5];
  6. static unsigned long tiempo_mar = 0, tiempo_det = 0;
  7.  
  8. if (modo_motor == MODO_PARADO)
  9. {
  10. tiempo_det = millis() - tiempo_mar;
  11. lcd.setCursor(0, 0);
  12. lcd.print("Parado");
  13. sprintf(cadena, "%04ld", tiempo_det / 1000);
  14. lcd.setCursor(12, 0);
  15. lcd.print(cadena);
  16. }
  17. if (modo_motor == (MODO_ESTRELLA || MODO_TRIANGULO))
  18. {
  19. tiempo_mar = millis() - tiempo_det;
  20. lcd.setCursor(0, 0);
  21. lcd.print("Marchando");
  22. sprintf(cadena2, "%04ld", tiempo_mar / 1000);
  23. lcd.setCursor(12, 0);
  24. lcd.print(cadena2);
  25. }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement