mirror of
https://github.com/RobotechLille/cdf2018-principal
synced 2024-05-21 14:16:22 +02:00
32 lines
368 B
C
32 lines
368 B
C
#include <stdio.h>
|
|
|
|
#include "lcd.h"
|
|
|
|
int points;
|
|
char tempLine[16];
|
|
|
|
void resetPoints()
|
|
{
|
|
points = 0;
|
|
}
|
|
|
|
int getPoints()
|
|
{
|
|
return points;
|
|
}
|
|
|
|
void showPoints()
|
|
{
|
|
sprintf(tempLine, "%d points", getPoints());
|
|
lockLCD();
|
|
gotoLCD(LCD_LINE_2);
|
|
printLCD(tempLine);
|
|
unlockLCD();
|
|
}
|
|
|
|
void addPoints(int pts)
|
|
{
|
|
points += pts;
|
|
showPoints();
|
|
}
|