floatpump-firmware/Middlewares/floatpump/Inc/InitSequence.h

47 lines
971 B
C++

//
// Created by robtor on 15.12.22.
//
#ifndef FLOATPUMP_INITSEQUENCE_H
#define FLOATPUMP_INITSEQUENCE_H
#include <string>
#include "main.h"
#include "LCD_I2C_Driver.h"
#include "git_rev.h"
namespace floatpump {
class InitSequence {
public:
InitSequence(LCD_I2C_Driver &driver) : driver(driver) {};
void runInitSequence(bool silent = false, bool noBacklight = false);
private:
LCD_I2C_Driver &driver;
uint16_t flash_duration = 100;
uint16_t beep_duration = 50;
uint16_t welcome_duration = 5000;
std::string welcometext[4] = {
"FloatPUMP Controller",
" Rev " GIT_HASH,
" ********** ",
" www.robtor.de "
};
void ledFlash(GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin);
void beeperExecute();
void displayWelcome(bool backlight);
};
} // floatpump
#endif //FLOATPUMP_INITSEQUENCE_H