-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from vladkorotnev/develop
v2.1
- Loading branch information
Showing
72 changed files
with
3,592 additions
and
275 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#pragma once | ||
#include <device_config.h> | ||
#include <sensor/sensor.h> | ||
#include <views/framework.h> | ||
#include <views/menu/menu.h> | ||
|
||
#if HAS(BALANCE_BOARD_INTEGRATION) | ||
class AppShimWeighing: public Composite { | ||
public: | ||
AppShimWeighing(SensorPool *); | ||
~AppShimWeighing(); | ||
|
||
void prepare(); | ||
void render(FantaManipulator*); | ||
void step(); | ||
|
||
private: | ||
ViewMultiplexor * carousel; | ||
SensorPool * sensors; | ||
TickType_t lastActivity; | ||
class WeighingView; | ||
enum WeighingAppState { | ||
NEED_CONNECT, | ||
WAIT_CONNECT, | ||
WEIGHING | ||
}; | ||
void update_state(transition_type_t); | ||
}; | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#pragma once | ||
#include "keys.h" | ||
#include <vector> | ||
#include "esp32-hal-gpio.h" | ||
|
||
typedef std::vector<std::pair<const gpio_num_t, const key_id_t>> keypad_definition_t; | ||
void keypad_start(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,32 @@ | ||
#pragma once | ||
#include "time.h" | ||
#include <stdint.h> | ||
#include <sensor/sensor.h> | ||
|
||
#define ALARM_LIST_SIZE 9 | ||
#define ALARM_DAY_GLOBAL_ENABLE (1 << 7) | ||
#define ALARM_DAY_OF_WEEK(d) (1 << d) | ||
#define ALARM_DAY_OF_WEEK(d) (1 << (d)) | ||
|
||
#define ALARM_ON_DAY(a,d) (((a).days & ALARM_DAY_OF_WEEK(d)) != 0) | ||
#define ALARM_IS_ENABLED(x) (((x).days & ALARM_DAY_GLOBAL_ENABLE) != 0) | ||
#define ALARM_ON_DAY(a,d) (((a).days & ALARM_DAY_OF_WEEK((d))) != 0) | ||
|
||
typedef struct alarm_setting { | ||
typedef struct __attribute__((__packed__)) alarm_setting { | ||
bool enabled : 1; | ||
/// @brief LSB is Sunday, B1 is Monday, and so on. Disabled altogether when MSB not set.. | ||
uint8_t days; | ||
uint8_t days : 7; | ||
|
||
int hour; | ||
int minute; | ||
int melody_no; | ||
|
||
bool smart : 1; | ||
uint8_t smart_margin_minutes : 7; | ||
} alarm_setting_t; | ||
|
||
void alarm_init(); | ||
void alarm_init(SensorPool*); | ||
|
||
const alarm_setting_t * get_alarm_list(); | ||
void set_alarm(uint8_t idx, alarm_setting_t setting); | ||
|
||
const alarm_setting_t* get_triggered_alarm(); | ||
const alarm_setting_t* get_upcoming_alarm(); | ||
void clear_triggered_alarm(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#pragma once | ||
#include <sensor/sensor.h> | ||
#include <device_config.h> | ||
|
||
#if HAS(BALANCE_BOARD_INTEGRATION) | ||
|
||
typedef enum BalanceBoardState { | ||
BB_IDLE, | ||
BB_SCANNING, | ||
BB_CONNECTED | ||
} balance_board_state_t; | ||
|
||
void balance_board_start(SensorPool*); | ||
void balance_board_scan(bool); | ||
balance_board_state_t balance_board_state(); | ||
void balance_board_zero(); | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.