auto-sync

This commit is contained in:
rusEfi 2015-01-02 21:03:40 -06:00
parent 6b4f3e1c3b
commit 506a95356d
5 changed files with 24 additions and 2 deletions

View File

@ -154,11 +154,11 @@ static void fanRelayControl(void) {
Overflow64Counter halTime;
uint64_t getTimeNowUs(void) {
efitimeus_t getTimeNowUs(void) {
return getTimeNowNt() / (CORE_CLOCK / 1000000);
}
uint64_t getTimeNowNt(void) {
efitick_t getTimeNowNt(void) {
return halTime.get();
}

View File

@ -10,6 +10,14 @@
#include "engine.h"
typedef enum {
LL_VERSION,
LL_CONFIG,
LL_RPM,
LL_TEMPERATURE
} lcd_line_e;
void updateHD44780lcd(Engine *engine);
#endif /* LCD_CONTROLLER_H_ */

View File

@ -9,6 +9,15 @@
#include "main.h"
typedef enum {
CENTER = 0,
BUTTON_A = 1,
BUTTON_B = 2,
BUTTON_C = 3,
BUTTON_D = 4,
} joystick_button_e;
void onJoystick(joystick_button_e button);
void initJoystick(Logging *shared);
#endif /* CONTROLLERS_JOYSTICK_H_ */

View File

@ -141,6 +141,10 @@ void lcd_HD44780_set_position(uint8_t row, uint8_t column) {
lcd_HD44780_write_command(LCD_HD44780_DDRAM_ADDR + lineStart[row] + column);
}
int getCurrentHD44780row(void) {
return currentRow;
}
void lcd_HD44780_print_char(char data) {
if (data == '\n') {
lcd_HD44780_set_position(++currentRow, 0);

View File

@ -17,6 +17,7 @@ void lcd_HD44780_init(void);
void lcd_HD44780_set_position(uint8_t row, uint8_t column);
void lcd_HD44780_print_char(char data);
void lcd_HD44780_print_string(const char *string);
int getCurrentHD44780row(void);
void lcdShowFatalMessage(char *message);