Compare commits
5 Commits
a7c91cee0e
...
8a365ab5e0
Author | SHA1 | Date | |
---|---|---|---|
8a365ab5e0 | |||
7cd05e1582 | |||
0e97d57883 | |||
cced874460 | |||
49927a25cf |
@@ -46,7 +46,8 @@ CFILES += ui/lcd.c ui/menu.c reflow-menu.c
|
|||||||
CFILES += fatfs/diskio.c fatfs/ff.c fatfs/ffsystem.c fatfs/ffunicode.c fatfs/shimatta_sdio_driver/shimatta_sdio.c
|
CFILES += fatfs/diskio.c fatfs/ff.c fatfs/ffsystem.c fatfs/ffunicode.c fatfs/shimatta_sdio_driver/shimatta_sdio.c
|
||||||
CFILES += pid-controller.c oven-driver.c
|
CFILES += pid-controller.c oven-driver.c
|
||||||
CFILES += settings/settings.c settings/settings-sd-card.c
|
CFILES += settings/settings.c settings/settings-sd-card.c
|
||||||
CFILES += safety-adc.c
|
|
||||||
|
CFILES += safety/safety-adc.c
|
||||||
|
|
||||||
DEBUG_DEFINES = -DDEBUGBUILD
|
DEBUG_DEFINES = -DDEBUGBUILD
|
||||||
RELEASE_DEFINES =
|
RELEASE_DEFINES =
|
||||||
|
@@ -39,6 +39,8 @@
|
|||||||
#define LCD_SHIMATTA_STRING "\xBC\xCF\xAF\xC0"
|
#define LCD_SHIMATTA_STRING "\xBC\xCF\xAF\xC0"
|
||||||
#define LCD_DEGREE_SYMBOL_STRING "\xDF"
|
#define LCD_DEGREE_SYMBOL_STRING "\xDF"
|
||||||
#define LCD_DEGREE_SYMBOL_CHAR '\xDF'
|
#define LCD_DEGREE_SYMBOL_CHAR '\xDF'
|
||||||
|
#define LCD_OHM_SYMBOL_CHAR '\xF4'
|
||||||
|
#define LCD_OHM_SYMBOL_STRING "\xF4"
|
||||||
|
|
||||||
enum lcd_fsm_ret {LCD_FSM_NOP, LCD_FSM_CALL_AGAIN, LCD_FSM_WAIT_CALL};
|
enum lcd_fsm_ret {LCD_FSM_NOP, LCD_FSM_CALL_AGAIN, LCD_FSM_WAIT_CALL};
|
||||||
|
|
||||||
|
@@ -41,7 +41,7 @@
|
|||||||
#include <stm-periph/uart.h>
|
#include <stm-periph/uart.h>
|
||||||
#include <reflow-controller/shell-uart-config.h>
|
#include <reflow-controller/shell-uart-config.h>
|
||||||
#include <reflow-controller/oven-driver.h>
|
#include <reflow-controller/oven-driver.h>
|
||||||
#include <reflow-controller/safety-adc.h>
|
#include <reflow-controller/safety/safety-adc.h>
|
||||||
#include <fatfs/ff.h>
|
#include <fatfs/ff.h>
|
||||||
#include <reflow-controller/reflow-menu.h>
|
#include <reflow-controller/reflow-menu.h>
|
||||||
|
|
||||||
@@ -74,6 +74,9 @@ static inline void uart_gpio_config(void)
|
|||||||
SHELL_UART_PORT->MODER |= ALTFUNC(SHELL_UART_RX_PIN) | ALTFUNC(SHELL_UART_TX_PIN);
|
SHELL_UART_PORT->MODER |= ALTFUNC(SHELL_UART_RX_PIN) | ALTFUNC(SHELL_UART_TX_PIN);
|
||||||
SETAF(SHELL_UART_PORT, SHELL_UART_RX_PIN, SHELL_UART_RX_PIN_ALTFUNC);
|
SETAF(SHELL_UART_PORT, SHELL_UART_RX_PIN, SHELL_UART_RX_PIN_ALTFUNC);
|
||||||
SETAF(SHELL_UART_PORT, SHELL_UART_TX_PIN, SHELL_UART_TX_PIN_ALTFUNC);
|
SETAF(SHELL_UART_PORT, SHELL_UART_TX_PIN, SHELL_UART_TX_PIN_ALTFUNC);
|
||||||
|
|
||||||
|
/* Setup Pullup resistor at UART RX */
|
||||||
|
SHELL_UART_PORT->PUPDR |= PULLUP(SHELL_UART_RX_PIN);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -256,6 +259,8 @@ int main(void)
|
|||||||
|
|
||||||
if (menu_wait_request)
|
if (menu_wait_request)
|
||||||
__WFI();
|
__WFI();
|
||||||
|
else
|
||||||
|
__NOP();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -24,7 +24,7 @@
|
|||||||
#include <reflow-controller/rotary-encoder.h>
|
#include <reflow-controller/rotary-encoder.h>
|
||||||
#include <reflow-controller/systick.h>
|
#include <reflow-controller/systick.h>
|
||||||
#include <reflow-controller/adc-meas.h>
|
#include <reflow-controller/adc-meas.h>
|
||||||
#include <reflow-controller/safety-adc.h>
|
#include <reflow-controller/safety/safety-adc.h>
|
||||||
#include <reflow-controller/temp-converter.h>
|
#include <reflow-controller/temp-converter.h>
|
||||||
#include <helper-macros/helper-macros.h>
|
#include <helper-macros/helper-macros.h>
|
||||||
#include <stm-periph/unique-id.h>
|
#include <stm-periph/unique-id.h>
|
||||||
@@ -71,7 +71,7 @@ static void reflow_menu_monitor(struct lcd_menu *menu, enum menu_entry_func_entr
|
|||||||
if (systick_ticks_have_passed(my_timestamp, 250)) {
|
if (systick_ticks_have_passed(my_timestamp, 250)) {
|
||||||
my_timestamp = systick_get_global_tick();
|
my_timestamp = systick_get_global_tick();
|
||||||
adc_pt1000_get_current_resistance(&tmp);
|
adc_pt1000_get_current_resistance(&tmp);
|
||||||
snprintf(line, sizeof(line), "Res: %.1f", tmp);
|
snprintf(line, sizeof(line), "Res: %.1f " LCD_OHM_SYMBOL_STRING, tmp);
|
||||||
menu->update_display(0, line);
|
menu->update_display(0, line);
|
||||||
|
|
||||||
res = temp_converter_convert_resistance_to_temp(tmp, &tmp);
|
res = temp_converter_convert_resistance_to_temp(tmp, &tmp);
|
||||||
@@ -206,6 +206,7 @@ static void reflow_menu_root_entry(struct lcd_menu *menu, enum menu_entry_func_e
|
|||||||
(void)parent;
|
(void)parent;
|
||||||
static struct menu_list list;
|
static struct menu_list list;
|
||||||
static bool button_valid;
|
static bool button_valid;
|
||||||
|
static bool menu_changed = true;
|
||||||
static const char * const root_entry_names[] = {
|
static const char * const root_entry_names[] = {
|
||||||
"About",
|
"About",
|
||||||
"Monitoring",
|
"Monitoring",
|
||||||
@@ -219,6 +220,7 @@ static void reflow_menu_root_entry(struct lcd_menu *menu, enum menu_entry_func_e
|
|||||||
int16_t rot_delta;
|
int16_t rot_delta;
|
||||||
|
|
||||||
if (entry_type != MENU_ENTRY_CONTINUE) {
|
if (entry_type != MENU_ENTRY_CONTINUE) {
|
||||||
|
menu_changed = true;
|
||||||
menu_display_clear(menu);
|
menu_display_clear(menu);
|
||||||
update_display_buffer(0, "Main Menu");
|
update_display_buffer(0, "Main Menu");
|
||||||
menu_ack_rotary_delta(menu);
|
menu_ack_rotary_delta(menu);
|
||||||
@@ -245,12 +247,15 @@ static void reflow_menu_root_entry(struct lcd_menu *menu, enum menu_entry_func_e
|
|||||||
if (rot_delta >= 4) {
|
if (rot_delta >= 4) {
|
||||||
menu_list_scroll_down(&list);
|
menu_list_scroll_down(&list);
|
||||||
menu_ack_rotary_delta(menu);
|
menu_ack_rotary_delta(menu);
|
||||||
|
menu_changed = true;
|
||||||
} else if (rot_delta <= -4) {
|
} else if (rot_delta <= -4) {
|
||||||
menu_list_scroll_up(&list);
|
menu_list_scroll_up(&list);
|
||||||
menu_ack_rotary_delta(menu);
|
menu_ack_rotary_delta(menu);
|
||||||
|
menu_changed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
menu_list_display(&list, 1, 3);
|
if (menu_changed)
|
||||||
|
menu_list_display(&list, 1, 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
int reflow_menu_handle()
|
int reflow_menu_handle()
|
||||||
|
@@ -18,7 +18,7 @@
|
|||||||
* If not, see <http://www.gnu.org/licenses/>.
|
* If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <reflow-controller/safety-adc.h>
|
#include <reflow-controller/safety/safety-adc.h>
|
||||||
#include <reflow-controller/periph-config/safety-adc-hwcfg.h>
|
#include <reflow-controller/periph-config/safety-adc-hwcfg.h>
|
||||||
#include <helper-macros/helper-macros.h>
|
#include <helper-macros/helper-macros.h>
|
||||||
#include <stm-periph/clock-enable-manager.h>
|
#include <stm-periph/clock-enable-manager.h>
|
@@ -35,7 +35,7 @@
|
|||||||
#include <fatfs/ff.h>
|
#include <fatfs/ff.h>
|
||||||
#include <reflow-controller/stack-check.h>
|
#include <reflow-controller/stack-check.h>
|
||||||
#include <reflow-controller/rotary-encoder.h>
|
#include <reflow-controller/rotary-encoder.h>
|
||||||
#include <reflow-controller/safety-adc.h>
|
#include <reflow-controller/safety/safety-adc.h>
|
||||||
|
|
||||||
#ifndef GIT_VER
|
#ifndef GIT_VER
|
||||||
#define GIT_VER "VERSION NOT SET"
|
#define GIT_VER "VERSION NOT SET"
|
||||||
|
Submodule stm-firmware/shellmatta updated: 73e8f0af03...1b7cdb1acc
Reference in New Issue
Block a user