Private links

This commit is contained in:
Ben V. Brown
2022-06-20 19:16:09 +10:00
parent e6a080c33d
commit 22d0b0d643
19 changed files with 98 additions and 134 deletions

View File

@@ -1,7 +1,7 @@
set(sources
freertos.c
FreeRTOSHooks.c
gui.cpp
settingsGUI.cpp
main.cpp
power.cpp
QC3.cpp
@@ -14,4 +14,4 @@ Translation.cpp
add_library(mainSource ${sources})
target_include_directories(mainSource PUBLIC .)
target_link_libraries(mainSource PUBLIC brieflz BSP FreeRTOS drivers languages)
target_link_libraries(mainSource PRIVATE brieflz BSP FreeRTOS drivers languages)

View File

@@ -8,14 +8,8 @@
#ifndef INC_QC3_H_
#define INC_QC3_H_
#include "stdint.h"
#ifdef __cplusplus
extern "C" {
#endif
void seekQC(int16_t Vx10, uint16_t divisor);
void startQC(uint16_t divisor); // Tries to negotiate QC for highest voltage, must be run after
bool hasQCNegotiated(); // Returns true if a QC negotiation worked (we are using QC)
#ifdef __cplusplus
}
#endif
#endif /* INC_QC3_H_ */

View File

@@ -1,6 +1,6 @@
#include "ScrollMessage.hpp"
#include "OLED.hpp"
#include "Settings.h"
#include "configuration.h"
/**

View File

@@ -1,40 +0,0 @@
/*
* settingsGUI.h
*
* Created on: 3Sep.,2017
* Author: Ben V. Brown
*/
#ifndef GUI_HPP_
#define GUI_HPP_
#include "BSP.h"
#include "Settings.h"
#include "Translation.h"
#define PRESS_ACCEL_STEP (TICKS_100MS / 3)
#define PRESS_ACCEL_INTERVAL_MIN TICKS_100MS
#define PRESS_ACCEL_INTERVAL_MAX (TICKS_100MS * 3)
// GUI holds the menu structure and all its methods for the menu itself
// Declarations for all the methods for the settings menu (at end of this file)
// Struct for holding the function pointers and descriptions
typedef struct {
// The settings description index, please use the `SETTINGS_DESC` macro with
// the `SettingsItemIndex` enum. Use 0 for no description.
uint8_t description;
// return true if increment reached the maximum value
bool (*const incrementHandler)(void);
void (*const draw)(void);
bool (*const isVisible)(void);
// If this is set, we will automatically use the settings increment handler instead, set >= num settings to disable
SettingsOptions autoSettingOption;
} menuitem;
void enterSettingsMenu();
void GUIDelay();
void warnUser(const char *warning, const int timeout);
extern const menuitem rootSettingsMenu[];
#endif /* GUI_HPP_ */