Select missions with right encoder
|
@ -21,15 +21,15 @@
|
||||||
/* Includes ------------------------------------------------------------------*/
|
/* Includes ------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "app_azure_rtos.h"
|
#include "app_azure_rtos.h"
|
||||||
#include "app_touchgfx.h"
|
|
||||||
#include "stm32h7xx.h"
|
#include "stm32h7xx.h"
|
||||||
|
|
||||||
/* Private includes ----------------------------------------------------------*/
|
/* Private includes ----------------------------------------------------------*/
|
||||||
/* USER CODE BEGIN Includes */
|
/* USER CODE BEGIN Includes */
|
||||||
#include "app.h"
|
#include "app.h"
|
||||||
#include "graphics.h"
|
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
#include "tx_api.h"
|
#include "tx_api.h"
|
||||||
|
#include "tx_port.h"
|
||||||
|
#include "ui.h"
|
||||||
|
|
||||||
/* USER CODE END Includes */
|
/* USER CODE END Includes */
|
||||||
|
|
||||||
|
@ -63,7 +63,8 @@ static TX_BYTE_POOL tx_app_byte_pool;
|
||||||
|
|
||||||
/* USER CODE BEGIN PV */
|
/* USER CODE BEGIN PV */
|
||||||
TX_THREAD app_thread;
|
TX_THREAD app_thread;
|
||||||
TX_THREAD graphics_thread;
|
TX_THREAD ui_thread;
|
||||||
|
TX_QUEUE ui_queue;
|
||||||
/* USER CODE END PV */
|
/* USER CODE END PV */
|
||||||
|
|
||||||
/* Private function prototypes -----------------------------------------------*/
|
/* Private function prototypes -----------------------------------------------*/
|
||||||
|
@ -157,12 +158,22 @@ VOID tx_application_define(VOID *first_unused_memory) {
|
||||||
Error_Handler();
|
Error_Handler();
|
||||||
}
|
}
|
||||||
|
|
||||||
void *graphics_thread_stack = mem;
|
void *ui_queue_start = mem;
|
||||||
|
ULONG ui_queue_msg_size = sizeof(UIMessage) / sizeof(ULONG);
|
||||||
|
if (ui_queue_msg_size % sizeof(ULONG) != 0) {
|
||||||
|
ui_queue_msg_size++;
|
||||||
|
}
|
||||||
|
mem += UI_QUEUE_SIZE * ui_queue_msg_size;
|
||||||
|
if (tx_queue_create(&ui_queue, "UI Queue", ui_queue_msg_size, ui_queue_start,
|
||||||
|
UI_QUEUE_SIZE * ui_queue_msg_size) != TX_SUCCESS) {
|
||||||
|
Error_Handler();
|
||||||
|
}
|
||||||
|
|
||||||
|
void *ui_thread_stack = mem;
|
||||||
mem += THREAD_STACK_SIZE;
|
mem += THREAD_STACK_SIZE;
|
||||||
if (tx_thread_create(&graphics_thread, "Graphics Thread",
|
if (tx_thread_create(&ui_thread, "UI Thread", ui_thread_entry, 0,
|
||||||
graphics_thread_entry, 0, graphics_thread_stack,
|
ui_thread_stack, THREAD_STACK_SIZE, THREAD_PRIO_UI,
|
||||||
THREAD_STACK_SIZE, THREAD_PRIO_GRAPHICS,
|
THREAD_PRIO_UI, TX_NO_TIME_SLICE,
|
||||||
THREAD_PRIO_GRAPHICS, TX_NO_TIME_SLICE,
|
|
||||||
TX_AUTO_START) != TX_SUCCESS) {
|
TX_AUTO_START) != TX_SUCCESS) {
|
||||||
Error_Handler();
|
Error_Handler();
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,8 +44,8 @@ extern "C" {
|
||||||
#define THREAD_STACK_SIZE 4096
|
#define THREAD_STACK_SIZE 4096
|
||||||
|
|
||||||
#define THREAD_PRIO_APP 10
|
#define THREAD_PRIO_APP 10
|
||||||
#define THREAD_PRIO_GRAPHICS 20
|
#define THREAD_PRIO_UI 6
|
||||||
#define THREAD_PRIO_UI 5
|
#define UI_QUEUE_SIZE 10
|
||||||
/* USER CODE END EC */
|
/* USER CODE END EC */
|
||||||
|
|
||||||
/* Exported macro ------------------------------------------------------------*/
|
/* Exported macro ------------------------------------------------------------*/
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
#ifndef __INC_GRAPHICS_H
|
|
||||||
#define __INC_GRAPHICS_H
|
|
||||||
|
|
||||||
#include "tx_port.h"
|
|
||||||
|
|
||||||
void graphics_thread_entry(ULONG _);
|
|
||||||
|
|
||||||
#endif // __INC_GRAPHICS_H
|
|
|
@ -4,9 +4,17 @@
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
void HX8357D_WriteData(uint8_t *data, size_t data_len);
|
void HX8357D_WriteData(uint8_t *data, size_t data_len);
|
||||||
void HX8357D_WriteReg(uint8_t addr, uint8_t *data, size_t data_len);
|
void HX8357D_WriteReg(uint8_t addr, uint8_t *data, size_t data_len);
|
||||||
void HX8357D_Init();
|
void HX8357D_Init();
|
||||||
void HX8357D_Mode_RGB666();
|
void HX8357D_Mode_RGB666();
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif // __HX8357D_H
|
#endif // __HX8357D_H
|
||||||
|
|
|
@ -31,7 +31,7 @@ extern "C" {
|
||||||
|
|
||||||
/* Private includes ----------------------------------------------------------*/
|
/* Private includes ----------------------------------------------------------*/
|
||||||
/* USER CODE BEGIN Includes */
|
/* USER CODE BEGIN Includes */
|
||||||
|
#include "tx_api.h"
|
||||||
/* USER CODE END Includes */
|
/* USER CODE END Includes */
|
||||||
|
|
||||||
/* Exported types ------------------------------------------------------------*/
|
/* Exported types ------------------------------------------------------------*/
|
||||||
|
@ -42,6 +42,7 @@ extern "C" {
|
||||||
/* Exported constants --------------------------------------------------------*/
|
/* Exported constants --------------------------------------------------------*/
|
||||||
/* USER CODE BEGIN EC */
|
/* USER CODE BEGIN EC */
|
||||||
extern volatile int ltdc_cb_triggered;
|
extern volatile int ltdc_cb_triggered;
|
||||||
|
extern TX_QUEUE ui_queue;
|
||||||
/* USER CODE END EC */
|
/* USER CODE END EC */
|
||||||
|
|
||||||
/* Exported macro ------------------------------------------------------------*/
|
/* Exported macro ------------------------------------------------------------*/
|
||||||
|
@ -61,12 +62,16 @@ void Error_Handler(void);
|
||||||
/* Private defines -----------------------------------------------------------*/
|
/* Private defines -----------------------------------------------------------*/
|
||||||
#define ENC1A_Pin GPIO_PIN_3
|
#define ENC1A_Pin GPIO_PIN_3
|
||||||
#define ENC1A_GPIO_Port GPIOE
|
#define ENC1A_GPIO_Port GPIOE
|
||||||
|
#define ENC1A_EXTI_IRQn EXTI3_IRQn
|
||||||
#define ENC1B_Pin GPIO_PIN_4
|
#define ENC1B_Pin GPIO_PIN_4
|
||||||
#define ENC1B_GPIO_Port GPIOE
|
#define ENC1B_GPIO_Port GPIOE
|
||||||
|
#define ENC1B_EXTI_IRQn EXTI4_IRQn
|
||||||
#define ENC2A_Pin GPIO_PIN_5
|
#define ENC2A_Pin GPIO_PIN_5
|
||||||
#define ENC2A_GPIO_Port GPIOE
|
#define ENC2A_GPIO_Port GPIOE
|
||||||
|
#define ENC2A_EXTI_IRQn EXTI9_5_IRQn
|
||||||
#define ENC2B_Pin GPIO_PIN_6
|
#define ENC2B_Pin GPIO_PIN_6
|
||||||
#define ENC2B_GPIO_Port GPIOE
|
#define ENC2B_GPIO_Port GPIOE
|
||||||
|
#define ENC2B_EXTI_IRQn EXTI9_5_IRQn
|
||||||
#define BTN1_Pin GPIO_PIN_0
|
#define BTN1_Pin GPIO_PIN_0
|
||||||
#define BTN1_GPIO_Port GPIOF
|
#define BTN1_GPIO_Port GPIOF
|
||||||
#define BTN2_Pin GPIO_PIN_1
|
#define BTN2_Pin GPIO_PIN_1
|
||||||
|
|
|
@ -52,6 +52,9 @@ void MemManage_Handler(void);
|
||||||
void BusFault_Handler(void);
|
void BusFault_Handler(void);
|
||||||
void UsageFault_Handler(void);
|
void UsageFault_Handler(void);
|
||||||
void DebugMon_Handler(void);
|
void DebugMon_Handler(void);
|
||||||
|
void EXTI3_IRQHandler(void);
|
||||||
|
void EXTI4_IRQHandler(void);
|
||||||
|
void EXTI9_5_IRQHandler(void);
|
||||||
void TIM6_DAC_IRQHandler(void);
|
void TIM6_DAC_IRQHandler(void);
|
||||||
void LTDC_IRQHandler(void);
|
void LTDC_IRQHandler(void);
|
||||||
/* USER CODE BEGIN EFP */
|
/* USER CODE BEGIN EFP */
|
||||||
|
|
|
@ -2,5 +2,15 @@
|
||||||
#define __INC_STW_DEFINES_H
|
#define __INC_STW_DEFINES_H
|
||||||
|
|
||||||
#define NUM_MISSIONS 7
|
#define NUM_MISSIONS 7
|
||||||
|
typedef enum {
|
||||||
|
MISSION_NONE = 0,
|
||||||
|
MISSION_ACCEL = 1,
|
||||||
|
MISSION_SKIDPAD = 2,
|
||||||
|
MISSION_AUTOX = 3,
|
||||||
|
MISSION_TRACKDRIVE = 4,
|
||||||
|
MISSION_EBS = 5,
|
||||||
|
MISSION_INSPECTION = 6,
|
||||||
|
MISSION_MANUAL = 7
|
||||||
|
} Mission;
|
||||||
|
|
||||||
#endif // __INC_STW_DEFINES_H
|
#endif // __INC_STW_DEFINES_H
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
#ifndef __INC_ui_H
|
||||||
|
#define __INC_ui_H
|
||||||
|
|
||||||
|
#include "tx_port.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define NUM_BUTTONS 6
|
||||||
|
#define NUM_ENCS 2
|
||||||
|
#define BUTTON_MIN_PRESS_TIME 50 // ms
|
||||||
|
#define ENC_MAX_PHASE 50 // ms
|
||||||
|
|
||||||
|
typedef enum { UMK_BTN_RELEASED, UMK_ENC_CW, UMK_ENC_CCW } UIMessageKind;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
UIMessageKind kind;
|
||||||
|
int number;
|
||||||
|
} UIMessage;
|
||||||
|
|
||||||
|
void ui_thread_entry(ULONG _);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // __INC_ui_H
|
|
@ -1,17 +0,0 @@
|
||||||
#include "graphics.h"
|
|
||||||
|
|
||||||
#include "stm32h7xx_hal.h"
|
|
||||||
#include "tx_api.h"
|
|
||||||
|
|
||||||
#include "hx8357d.h"
|
|
||||||
#include "main.h"
|
|
||||||
|
|
||||||
void graphics_thread_entry(ULONG _) {
|
|
||||||
HX8357D_Init();
|
|
||||||
HX8357D_Mode_RGB666();
|
|
||||||
|
|
||||||
while (1) {
|
|
||||||
HAL_GPIO_TogglePin(STATUS2_GPIO_Port, STATUS2_Pin);
|
|
||||||
tx_thread_sleep(100);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -135,6 +135,8 @@ int main(void) {
|
||||||
Error_Handler();
|
Error_Handler();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
HX8357D_Init();
|
||||||
|
HX8357D_Mode_RGB666();
|
||||||
/* USER CODE END 2 */
|
/* USER CODE END 2 */
|
||||||
|
|
||||||
MX_ThreadX_Init();
|
MX_ThreadX_Init();
|
||||||
|
@ -395,8 +397,7 @@ static void MX_LTDC_Init(void) {
|
||||||
pLayerCfg.Alpha0 = 0;
|
pLayerCfg.Alpha0 = 0;
|
||||||
pLayerCfg.BlendingFactor1 = LTDC_BLENDING_FACTOR1_CA;
|
pLayerCfg.BlendingFactor1 = LTDC_BLENDING_FACTOR1_CA;
|
||||||
pLayerCfg.BlendingFactor2 = LTDC_BLENDING_FACTOR2_CA;
|
pLayerCfg.BlendingFactor2 = LTDC_BLENDING_FACTOR2_CA;
|
||||||
// pLayerCfg.FBStartAdress = (uint32_t)&image_data_ft_logo_rainbow_rgb565;
|
pLayerCfg.FBStartAdress = 0;
|
||||||
pLayerCfg.FBStartAdress = (uint32_t)0x24040000;
|
|
||||||
pLayerCfg.ImageWidth = 320;
|
pLayerCfg.ImageWidth = 320;
|
||||||
pLayerCfg.ImageHeight = 480;
|
pLayerCfg.ImageHeight = 480;
|
||||||
pLayerCfg.Backcolor.Blue = 0;
|
pLayerCfg.Backcolor.Blue = 0;
|
||||||
|
@ -717,7 +718,7 @@ static void MX_GPIO_Init(void) {
|
||||||
|
|
||||||
/*Configure GPIO pins : ENC1A_Pin ENC1B_Pin ENC2A_Pin ENC2B_Pin */
|
/*Configure GPIO pins : ENC1A_Pin ENC1B_Pin ENC2A_Pin ENC2B_Pin */
|
||||||
GPIO_InitStruct.Pin = ENC1A_Pin | ENC1B_Pin | ENC2A_Pin | ENC2B_Pin;
|
GPIO_InitStruct.Pin = ENC1A_Pin | ENC1B_Pin | ENC2A_Pin | ENC2B_Pin;
|
||||||
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
|
GPIO_InitStruct.Mode = GPIO_MODE_IT_RISING_FALLING;
|
||||||
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||||
HAL_GPIO_Init(GPIOE, &GPIO_InitStruct);
|
HAL_GPIO_Init(GPIOE, &GPIO_InitStruct);
|
||||||
|
|
||||||
|
@ -758,6 +759,16 @@ static void MX_GPIO_Init(void) {
|
||||||
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
||||||
HAL_GPIO_Init(BOOT0_SET_GPIO_Port, &GPIO_InitStruct);
|
HAL_GPIO_Init(BOOT0_SET_GPIO_Port, &GPIO_InitStruct);
|
||||||
|
|
||||||
|
/* EXTI interrupt init*/
|
||||||
|
HAL_NVIC_SetPriority(EXTI3_IRQn, 0, 0);
|
||||||
|
HAL_NVIC_EnableIRQ(EXTI3_IRQn);
|
||||||
|
|
||||||
|
HAL_NVIC_SetPriority(EXTI4_IRQn, 0, 0);
|
||||||
|
HAL_NVIC_EnableIRQ(EXTI4_IRQn);
|
||||||
|
|
||||||
|
HAL_NVIC_SetPriority(EXTI9_5_IRQn, 0, 0);
|
||||||
|
HAL_NVIC_EnableIRQ(EXTI9_5_IRQn);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* USER CODE BEGIN 4 */
|
/* USER CODE BEGIN 4 */
|
||||||
|
|
|
@ -160,6 +160,49 @@ void DebugMon_Handler(void)
|
||||||
/* please refer to the startup file (startup_stm32h7xx.s). */
|
/* please refer to the startup file (startup_stm32h7xx.s). */
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief This function handles EXTI line3 interrupt.
|
||||||
|
*/
|
||||||
|
void EXTI3_IRQHandler(void)
|
||||||
|
{
|
||||||
|
/* USER CODE BEGIN EXTI3_IRQn 0 */
|
||||||
|
|
||||||
|
/* USER CODE END EXTI3_IRQn 0 */
|
||||||
|
HAL_GPIO_EXTI_IRQHandler(ENC1A_Pin);
|
||||||
|
/* USER CODE BEGIN EXTI3_IRQn 1 */
|
||||||
|
|
||||||
|
/* USER CODE END EXTI3_IRQn 1 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief This function handles EXTI line4 interrupt.
|
||||||
|
*/
|
||||||
|
void EXTI4_IRQHandler(void)
|
||||||
|
{
|
||||||
|
/* USER CODE BEGIN EXTI4_IRQn 0 */
|
||||||
|
|
||||||
|
/* USER CODE END EXTI4_IRQn 0 */
|
||||||
|
HAL_GPIO_EXTI_IRQHandler(ENC1B_Pin);
|
||||||
|
/* USER CODE BEGIN EXTI4_IRQn 1 */
|
||||||
|
|
||||||
|
/* USER CODE END EXTI4_IRQn 1 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief This function handles EXTI line[9:5] interrupts.
|
||||||
|
*/
|
||||||
|
void EXTI9_5_IRQHandler(void)
|
||||||
|
{
|
||||||
|
/* USER CODE BEGIN EXTI9_5_IRQn 0 */
|
||||||
|
|
||||||
|
/* USER CODE END EXTI9_5_IRQn 0 */
|
||||||
|
HAL_GPIO_EXTI_IRQHandler(ENC2A_Pin);
|
||||||
|
HAL_GPIO_EXTI_IRQHandler(ENC2B_Pin);
|
||||||
|
/* USER CODE BEGIN EXTI9_5_IRQn 1 */
|
||||||
|
|
||||||
|
/* USER CODE END EXTI9_5_IRQn 1 */
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This function handles TIM6 global interrupt, DAC1_CH1 and DAC1_CH2 underrun error interrupts.
|
* @brief This function handles TIM6 global interrupt, DAC1_CH1 and DAC1_CH2 underrun error interrupts.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -0,0 +1,97 @@
|
||||||
|
#include "ui.h"
|
||||||
|
|
||||||
|
#include "stm32h7a3xx.h"
|
||||||
|
#include "stm32h7xx_hal.h"
|
||||||
|
#include "stm32h7xx_hal_gpio.h"
|
||||||
|
#include "tx_api.h"
|
||||||
|
|
||||||
|
#include "hx8357d.h"
|
||||||
|
#include "main.h"
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
void ui_thread_entry(ULONG _) {
|
||||||
|
GPIO_TypeDef *button_ports[NUM_BUTTONS] = {BTN1_GPIO_Port, BTN2_GPIO_Port,
|
||||||
|
BTN3_GPIO_Port, BTN4_GPIO_Port,
|
||||||
|
BTN5_GPIO_Port, BTN6_GPIO_Port};
|
||||||
|
uint16_t button_pins[NUM_BUTTONS] = {BTN1_Pin, BTN2_Pin, BTN3_Pin,
|
||||||
|
BTN4_Pin, BTN5_Pin, BTN6_Pin};
|
||||||
|
GPIO_PinState button_states[NUM_BUTTONS] = {GPIO_PIN_RESET};
|
||||||
|
uint32_t button_change_times[NUM_BUTTONS] = {HAL_GetTick()};
|
||||||
|
|
||||||
|
while (1) {
|
||||||
|
for (int i = 0; i < NUM_BUTTONS; i++) {
|
||||||
|
GPIO_PinState state = HAL_GPIO_ReadPin(button_ports[i], button_pins[i]);
|
||||||
|
if (state != button_states[i]) {
|
||||||
|
uint32_t now = HAL_GetTick();
|
||||||
|
if (state == GPIO_PIN_RESET && now - button_change_times[i]) {
|
||||||
|
// Button release event!
|
||||||
|
UIMessage msg = {.kind = UMK_BTN_RELEASED, .number = i};
|
||||||
|
tx_queue_send(&ui_queue, &msg, TX_NO_WAIT);
|
||||||
|
}
|
||||||
|
button_change_times[i] = now;
|
||||||
|
button_states[i] = state;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Release so other threads can get scheduled
|
||||||
|
tx_thread_sleep(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin) {
|
||||||
|
// This gets called when an edge on one of the encoder pins is detected.
|
||||||
|
static uint32_t last_change[NUM_ENCS * 2] = {0};
|
||||||
|
static GPIO_PinState last_state[NUM_ENCS * 2] = {GPIO_PIN_RESET};
|
||||||
|
|
||||||
|
if (GPIO_Pin == ENC2B_Pin) {
|
||||||
|
// ENC2A and ENC2B share an interrupt line, so the HAL calls this callback
|
||||||
|
// once with each pin. Since we already handled the interrupt once for
|
||||||
|
// ENC2A, we can just ignore it now.
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32_t now = HAL_GetTick();
|
||||||
|
|
||||||
|
uint16_t pin_a, pin_b;
|
||||||
|
int idx_a, idx_b;
|
||||||
|
UIMessage msg;
|
||||||
|
if (GPIO_Pin == ENC1A_Pin || GPIO_Pin == ENC1B_Pin) {
|
||||||
|
pin_a = ENC1A_Pin;
|
||||||
|
pin_b = ENC1B_Pin;
|
||||||
|
idx_a = 0;
|
||||||
|
idx_b = 1;
|
||||||
|
msg.number = 0;
|
||||||
|
} else {
|
||||||
|
pin_a = ENC2A_Pin;
|
||||||
|
pin_b = ENC2B_Pin;
|
||||||
|
idx_a = 2;
|
||||||
|
idx_b = 3;
|
||||||
|
msg.number = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// All encoder pins are on port E
|
||||||
|
GPIO_PinState state_a = HAL_GPIO_ReadPin(GPIOE, pin_a);
|
||||||
|
GPIO_PinState state_b = HAL_GPIO_ReadPin(GPIOE, pin_b);
|
||||||
|
int a_changed = state_a != last_state[idx_a];
|
||||||
|
int b_changed = state_b != last_state[idx_b];
|
||||||
|
last_state[idx_a] = state_a;
|
||||||
|
last_state[idx_b] = state_b;
|
||||||
|
|
||||||
|
if (state_a == GPIO_PIN_RESET && state_b == GPIO_PIN_RESET) {
|
||||||
|
// Second falling edge, direction depends on which pin changed last
|
||||||
|
if (a_changed && b_changed) {
|
||||||
|
// This shouldn't happen. Ignore this event.
|
||||||
|
last_change[idx_a] = now;
|
||||||
|
last_change[idx_b] = now;
|
||||||
|
return;
|
||||||
|
} else if (a_changed) {
|
||||||
|
last_change[idx_a] = now;
|
||||||
|
msg.kind = UMK_ENC_CCW;
|
||||||
|
} else if (b_changed) {
|
||||||
|
last_change[idx_b] = now;
|
||||||
|
msg.kind = UMK_ENC_CW;
|
||||||
|
} else {
|
||||||
|
// This shouldn't happen. Ignore this event.
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
tx_queue_send(&ui_queue, &msg, TX_NO_WAIT);
|
||||||
|
}
|
||||||
|
}
|
|
@ -160,7 +160,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Includes ------------------------------------------------------------------*/
|
/* Includes ------------------------------------------------------------------*/
|
||||||
#include "main.h"
|
|
||||||
#include "stm32h7xx_hal.h"
|
#include "stm32h7xx_hal.h"
|
||||||
|
|
||||||
/** @addtogroup STM32H7xx_HAL_Driver
|
/** @addtogroup STM32H7xx_HAL_Driver
|
||||||
|
@ -631,8 +630,6 @@ HAL_StatusTypeDef HAL_LTDC_UnRegisterCallback(LTDC_HandleTypeDef *hltdc, HAL_LTD
|
||||||
*/
|
*/
|
||||||
void HAL_LTDC_IRQHandler(LTDC_HandleTypeDef *hltdc)
|
void HAL_LTDC_IRQHandler(LTDC_HandleTypeDef *hltdc)
|
||||||
{
|
{
|
||||||
ltdc_cb_triggered++;
|
|
||||||
|
|
||||||
uint32_t isrflags = READ_REG(hltdc->Instance->ISR);
|
uint32_t isrflags = READ_REG(hltdc->Instance->ISR);
|
||||||
uint32_t itsources = READ_REG(hltdc->Instance->IER);
|
uint32_t itsources = READ_REG(hltdc->Instance->IER);
|
||||||
|
|
||||||
|
@ -695,7 +692,6 @@ void HAL_LTDC_IRQHandler(LTDC_HandleTypeDef *hltdc)
|
||||||
/* Line Interrupt management ************************************************/
|
/* Line Interrupt management ************************************************/
|
||||||
if (((isrflags & LTDC_ISR_LIF) != 0U) && ((itsources & LTDC_IER_LIE) != 0U))
|
if (((isrflags & LTDC_ISR_LIF) != 0U) && ((itsources & LTDC_IER_LIE) != 0U))
|
||||||
{
|
{
|
||||||
ltdc_cb_triggered++;
|
|
||||||
/* Disable the Line interrupt */
|
/* Disable the Line interrupt */
|
||||||
__HAL_LTDC_DISABLE_IT(hltdc, LTDC_IT_LI);
|
__HAL_LTDC_DISABLE_IT(hltdc, LTDC_IT_LI);
|
||||||
|
|
||||||
|
|
2
Makefile
|
@ -1,5 +1,5 @@
|
||||||
##########################################################################################################################
|
##########################################################################################################################
|
||||||
# File automatically-generated by tool: [projectgenerator] version: [3.18.0-B7] date: [Mon Mar 06 15:50:06 CET 2023]
|
# File automatically-generated by tool: [projectgenerator] version: [3.18.0-B7] date: [Tue Mar 07 19:47:03 CET 2023]
|
||||||
##########################################################################################################################
|
##########################################################################################################################
|
||||||
|
|
||||||
# ------------------------------------------------
|
# ------------------------------------------------
|
||||||
|
|
|
@ -39,12 +39,12 @@ C_SOURCES = \
|
||||||
AZURE_RTOS/App/app_azure_rtos.c \
|
AZURE_RTOS/App/app_azure_rtos.c \
|
||||||
Core/Src/app.c \
|
Core/Src/app.c \
|
||||||
Core/Src/app_threadx.c \
|
Core/Src/app_threadx.c \
|
||||||
Core/Src/graphics.c \
|
|
||||||
Core/Src/hx8357d.c \
|
Core/Src/hx8357d.c \
|
||||||
Core/Src/stm32h7xx_hal_msp.c \
|
Core/Src/stm32h7xx_hal_msp.c \
|
||||||
Core/Src/stm32h7xx_hal_timebase_tim.c \
|
Core/Src/stm32h7xx_hal_timebase_tim.c \
|
||||||
Core/Src/stm32h7xx_it.c \
|
Core/Src/stm32h7xx_it.c \
|
||||||
Core/Src/system_stm32h7xx.c \
|
Core/Src/system_stm32h7xx.c \
|
||||||
|
Core/Src/ui.c \
|
||||||
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal.c \
|
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal.c \
|
||||||
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_cortex.c \
|
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_cortex.c \
|
||||||
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_crc.c \
|
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_crc.c \
|
||||||
|
@ -347,6 +347,8 @@ TouchGFX/generated/images/src/image_Fasttube_Logo.cpp \
|
||||||
TouchGFX/generated/images/src/image_Fasttube_Logo_small.cpp \
|
TouchGFX/generated/images/src/image_Fasttube_Logo_small.cpp \
|
||||||
TouchGFX/generated/images/src/image_Fasttube_Logo_small_white.cpp \
|
TouchGFX/generated/images/src/image_Fasttube_Logo_small_white.cpp \
|
||||||
TouchGFX/generated/images/src/image_Fasttube_Logo_white.cpp \
|
TouchGFX/generated/images/src/image_Fasttube_Logo_white.cpp \
|
||||||
|
TouchGFX/generated/images/src/image_logo_dv_small.cpp \
|
||||||
|
TouchGFX/generated/images/src/image_logo_dv_small_white.cpp \
|
||||||
TouchGFX/generated/texts/src/LanguageGb.cpp \
|
TouchGFX/generated/texts/src/LanguageGb.cpp \
|
||||||
TouchGFX/generated/texts/src/Texts.cpp \
|
TouchGFX/generated/texts/src/Texts.cpp \
|
||||||
TouchGFX/generated/texts/src/TypedTextDatabase.cpp \
|
TouchGFX/generated/texts/src/TypedTextDatabase.cpp \
|
||||||
|
|
|
@ -8,11 +8,14 @@
|
||||||
"section": "ExtFlashSection",
|
"section": "ExtFlashSection",
|
||||||
"extra_section": "ExtFlashSection",
|
"extra_section": "ExtFlashSection",
|
||||||
"images": {
|
"images": {
|
||||||
"Fasttube_Logo.png": {
|
"Fasttube_Logo_small_white.png": {
|
||||||
"format": "RGB565"
|
"layout_rotation": "90"
|
||||||
},
|
},
|
||||||
"Fasttube_Logo_white.png": {
|
"logo_dv_small.png": {
|
||||||
"format": "RGB565"
|
"layout_rotation": "90"
|
||||||
|
},
|
||||||
|
"logo_dv_small_white.png": {
|
||||||
|
"layout_rotation": "90"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 6.5 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 3.0 KiB |
|
@ -11,6 +11,8 @@
|
||||||
#include <touchgfx/widgets/TextArea.hpp>
|
#include <touchgfx/widgets/TextArea.hpp>
|
||||||
#include <touchgfx/containers/ListLayout.hpp>
|
#include <touchgfx/containers/ListLayout.hpp>
|
||||||
#include <gui/containers/MissionSelectElement.hpp>
|
#include <gui/containers/MissionSelectElement.hpp>
|
||||||
|
#include <touchgfx/widgets/canvas/Line.hpp>
|
||||||
|
#include <touchgfx/widgets/canvas/PainterRGB565.hpp>
|
||||||
#include <touchgfx/widgets/Image.hpp>
|
#include <touchgfx/widgets/Image.hpp>
|
||||||
|
|
||||||
class MissionSelectViewBase : public touchgfx::View<MissionSelectPresenter>
|
class MissionSelectViewBase : public touchgfx::View<MissionSelectPresenter>
|
||||||
|
@ -38,7 +40,9 @@ protected:
|
||||||
MissionSelectElement ebs;
|
MissionSelectElement ebs;
|
||||||
MissionSelectElement inspection;
|
MissionSelectElement inspection;
|
||||||
MissionSelectElement manual;
|
MissionSelectElement manual;
|
||||||
touchgfx::Image image1;
|
touchgfx::Line lastLine;
|
||||||
|
touchgfx::PainterRGB565 lastLinePainter;
|
||||||
|
touchgfx::Image logo;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
|
|
@ -38,11 +38,20 @@ MissionSelectViewBase::MissionSelectViewBase()
|
||||||
|
|
||||||
missionList.add(manual);
|
missionList.add(manual);
|
||||||
|
|
||||||
|
lastLine.setPosition(0, 210, 480, 2);
|
||||||
|
lastLinePainter.setColor(touchgfx::Color::getColorFromRGB(170, 170, 170));
|
||||||
|
lastLine.setPainter(lastLinePainter);
|
||||||
|
lastLine.setStart(0, 0);
|
||||||
|
lastLine.setEnd(480, 0);
|
||||||
|
lastLine.setLineWidth(5);
|
||||||
|
lastLine.setLineEndingStyle(touchgfx::Line::ROUND_CAP_ENDING);
|
||||||
|
missionList.add(lastLine);
|
||||||
|
|
||||||
add(missionList);
|
add(missionList);
|
||||||
|
|
||||||
image1.setXY(160, 263);
|
logo.setXY(160, 263);
|
||||||
image1.setBitmap(touchgfx::Bitmap(BITMAP_FASTTUBE_LOGO_SMALL_WHITE_ID));
|
logo.setBitmap(touchgfx::Bitmap(BITMAP_LOGO_DV_SMALL_WHITE_ID));
|
||||||
add(image1);
|
add(logo);
|
||||||
}
|
}
|
||||||
|
|
||||||
MissionSelectViewBase::~MissionSelectViewBase()
|
MissionSelectViewBase::~MissionSelectViewBase()
|
||||||
|
|
|
@ -10,6 +10,8 @@ const uint16_t BITMAP_FASTTUBE_LOGO_ID = 0;
|
||||||
const uint16_t BITMAP_FASTTUBE_LOGO_SMALL_ID = 1;
|
const uint16_t BITMAP_FASTTUBE_LOGO_SMALL_ID = 1;
|
||||||
const uint16_t BITMAP_FASTTUBE_LOGO_SMALL_WHITE_ID = 2;
|
const uint16_t BITMAP_FASTTUBE_LOGO_SMALL_WHITE_ID = 2;
|
||||||
const uint16_t BITMAP_FASTTUBE_LOGO_WHITE_ID = 3;
|
const uint16_t BITMAP_FASTTUBE_LOGO_WHITE_ID = 3;
|
||||||
|
const uint16_t BITMAP_LOGO_DV_SMALL_ID = 4;
|
||||||
|
const uint16_t BITMAP_LOGO_DV_SMALL_WHITE_ID = 5;
|
||||||
|
|
||||||
namespace BitmapDatabase
|
namespace BitmapDatabase
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,21 +1,23 @@
|
||||||
// 4.21.2 0x29b80d2b
|
// 4.21.2 0xf00b0e5c
|
||||||
// Generated by imageconverter. Please, do not edit!
|
// Generated by imageconverter. Please, do not edit!
|
||||||
|
|
||||||
#include <images/BitmapDatabase.hpp>
|
#include <images/BitmapDatabase.hpp>
|
||||||
#include <touchgfx/Bitmap.hpp>
|
#include <touchgfx/Bitmap.hpp>
|
||||||
|
|
||||||
extern const unsigned char image_fasttube_logo[]; // BITMAP_FASTTUBE_LOGO_ID = 0, Size: 480x165 pixels
|
extern const unsigned char image_fasttube_logo[]; // BITMAP_FASTTUBE_LOGO_ID = 0, Size: 480x165 pixels
|
||||||
extern const unsigned char image_fasttube_logo_extra_data[];
|
|
||||||
extern const unsigned char image_fasttube_logo_small[]; // BITMAP_FASTTUBE_LOGO_SMALL_ID = 1, Size: 160x55 pixels
|
extern const unsigned char image_fasttube_logo_small[]; // BITMAP_FASTTUBE_LOGO_SMALL_ID = 1, Size: 160x55 pixels
|
||||||
extern const unsigned char image_fasttube_logo_small_white[]; // BITMAP_FASTTUBE_LOGO_SMALL_WHITE_ID = 2, Size: 160x55 pixels
|
extern const unsigned char image_fasttube_logo_small_white[]; // BITMAP_FASTTUBE_LOGO_SMALL_WHITE_ID = 2, Size: 160x55 pixels
|
||||||
extern const unsigned char image_fasttube_logo_white[]; // BITMAP_FASTTUBE_LOGO_WHITE_ID = 3, Size: 480x165 pixels
|
extern const unsigned char image_fasttube_logo_white[]; // BITMAP_FASTTUBE_LOGO_WHITE_ID = 3, Size: 480x165 pixels
|
||||||
extern const unsigned char image_fasttube_logo_white_extra_data[];
|
extern const unsigned char image_logo_dv_small[]; // BITMAP_LOGO_DV_SMALL_ID = 4, Size: 160x55 pixels
|
||||||
|
extern const unsigned char image_logo_dv_small_white[]; // BITMAP_LOGO_DV_SMALL_WHITE_ID = 5, Size: 160x55 pixels
|
||||||
|
|
||||||
const touchgfx::Bitmap::BitmapData bitmap_database[] = {
|
const touchgfx::Bitmap::BitmapData bitmap_database[] = {
|
||||||
{ image_fasttube_logo, image_fasttube_logo_extra_data, 480, 165, 184, 124, 113, ((uint8_t)touchgfx::Bitmap::RGB565) >> 3, 9, ((uint8_t)touchgfx::Bitmap::RGB565) & 0x7 },
|
{ image_fasttube_logo, 0, 480, 165, 0, 0, 480, ((uint8_t)touchgfx::Bitmap::RGB565) >> 3, 165, ((uint8_t)touchgfx::Bitmap::RGB565) & 0x7 },
|
||||||
{ image_fasttube_logo_small, 0, 160, 55, 62, 42, 36, ((uint8_t)touchgfx::Bitmap::ARGB8888) >> 3, 2, ((uint8_t)touchgfx::Bitmap::ARGB8888) & 0x7 },
|
{ image_fasttube_logo_small, 0, 160, 55, 0, 0, 160, ((uint8_t)touchgfx::Bitmap::RGB565) >> 3, 55, ((uint8_t)touchgfx::Bitmap::RGB565) & 0x7 },
|
||||||
{ image_fasttube_logo_small_white, 0, 160, 55, 62, 42, 36, ((uint8_t)touchgfx::Bitmap::ARGB8888) >> 3, 2, ((uint8_t)touchgfx::Bitmap::ARGB8888) & 0x7 },
|
{ image_fasttube_logo_small_white, 0, 160, 55, 0, 0, 160, ((uint8_t)touchgfx::Bitmap::RGB565) >> 3, 55, ((uint8_t)touchgfx::Bitmap::RGB565) & 0x7 },
|
||||||
{ image_fasttube_logo_white, image_fasttube_logo_white_extra_data, 480, 165, 184, 124, 113, ((uint8_t)touchgfx::Bitmap::RGB565) >> 3, 9, ((uint8_t)touchgfx::Bitmap::RGB565) & 0x7 }
|
{ image_fasttube_logo_white, 0, 480, 165, 0, 0, 480, ((uint8_t)touchgfx::Bitmap::RGB565) >> 3, 165, ((uint8_t)touchgfx::Bitmap::RGB565) & 0x7 },
|
||||||
|
{ image_logo_dv_small, 0, 160, 55, 62, 42, 37, ((uint8_t)touchgfx::Bitmap::ARGB8888) >> 3, 2, ((uint8_t)touchgfx::Bitmap::ARGB8888) & 0x7 },
|
||||||
|
{ image_logo_dv_small_white, 0, 160, 55, 62, 42, 37, ((uint8_t)touchgfx::Bitmap::ARGB8888) >> 3, 2, ((uint8_t)touchgfx::Bitmap::ARGB8888) & 0x7 }
|
||||||
};
|
};
|
||||||
|
|
||||||
namespace BitmapDatabase
|
namespace BitmapDatabase
|
||||||
|
|
|
@ -7,17 +7,16 @@ class FrontendHeap;
|
||||||
|
|
||||||
using namespace touchgfx;
|
using namespace touchgfx;
|
||||||
|
|
||||||
class FrontendApplication : public FrontendApplicationBase
|
class FrontendApplication : public FrontendApplicationBase {
|
||||||
{
|
|
||||||
public:
|
public:
|
||||||
FrontendApplication(Model& m, FrontendHeap& heap);
|
FrontendApplication(Model &m, FrontendHeap &heap);
|
||||||
virtual ~FrontendApplication() { }
|
virtual ~FrontendApplication() {}
|
||||||
|
|
||||||
|
virtual void handleTickEvent() {
|
||||||
|
FrontendApplicationBase::handleTickEvent();
|
||||||
|
model.tick();
|
||||||
|
}
|
||||||
|
|
||||||
virtual void handleTickEvent()
|
|
||||||
{
|
|
||||||
model.tick();
|
|
||||||
FrontendApplicationBase::handleTickEvent();
|
|
||||||
}
|
|
||||||
private:
|
private:
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#ifndef MISSIONSELECTELEMENT_HPP
|
#ifndef MISSIONSELECTELEMENT_HPP
|
||||||
#define MISSIONSELECTELEMENT_HPP
|
#define MISSIONSELECTELEMENT_HPP
|
||||||
|
|
||||||
|
#include "touchgfx/hal/Types.hpp"
|
||||||
#include <gui_generated/containers/MissionSelectElementBase.hpp>
|
#include <gui_generated/containers/MissionSelectElementBase.hpp>
|
||||||
#include <texts/TextKeysAndLanguages.hpp>
|
#include <texts/TextKeysAndLanguages.hpp>
|
||||||
|
|
||||||
|
@ -12,8 +13,11 @@ public:
|
||||||
virtual void initialize();
|
virtual void initialize();
|
||||||
|
|
||||||
void setUp(uint32_t i, TEXTS label);
|
void setUp(uint32_t i, TEXTS label);
|
||||||
|
void setSelected(bool selected);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
private:
|
||||||
|
touchgfx::colortype bgColor;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // MISSIONSELECTELEMENT_HPP
|
#endif // MISSIONSELECTELEMENT_HPP
|
||||||
|
|
|
@ -8,29 +8,32 @@ using namespace touchgfx;
|
||||||
|
|
||||||
class MissionSelectView;
|
class MissionSelectView;
|
||||||
|
|
||||||
class MissionSelectPresenter : public touchgfx::Presenter, public ModelListener
|
class MissionSelectPresenter : public touchgfx::Presenter,
|
||||||
{
|
public ModelListener {
|
||||||
public:
|
public:
|
||||||
MissionSelectPresenter(MissionSelectView& v);
|
MissionSelectPresenter(MissionSelectView &v);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The activate function is called automatically when this screen is "switched in"
|
* The activate function is called automatically when this screen is "switched
|
||||||
* (ie. made active). Initialization logic can be placed here.
|
* in" (ie. made active). Initialization logic can be placed here.
|
||||||
*/
|
*/
|
||||||
virtual void activate();
|
virtual void activate();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The deactivate function is called automatically when this screen is "switched out"
|
* The deactivate function is called automatically when this screen is
|
||||||
* (ie. made inactive). Teardown functionality can be placed here.
|
* "switched out" (ie. made inactive). Teardown functionality can be placed
|
||||||
*/
|
* here.
|
||||||
virtual void deactivate();
|
*/
|
||||||
|
virtual void deactivate();
|
||||||
|
|
||||||
virtual ~MissionSelectPresenter() {};
|
virtual ~MissionSelectPresenter(){};
|
||||||
|
|
||||||
|
virtual void notifyMissionChanged(Mission mission) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
MissionSelectPresenter();
|
MissionSelectPresenter();
|
||||||
|
|
||||||
MissionSelectView& view;
|
MissionSelectView &view;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // MISSIONSELECTPRESENTER_HPP
|
#endif // MISSIONSELECTPRESENTER_HPP
|
||||||
|
|
|
@ -1,17 +1,22 @@
|
||||||
#ifndef MISSIONSELECTVIEW_HPP
|
#ifndef MISSIONSELECTVIEW_HPP
|
||||||
#define MISSIONSELECTVIEW_HPP
|
#define MISSIONSELECTVIEW_HPP
|
||||||
|
|
||||||
#include <gui_generated/missionselect_screen/MissionSelectViewBase.hpp>
|
#include "gui/containers/MissionSelectElement.hpp"
|
||||||
#include <gui/missionselect_screen/MissionSelectPresenter.hpp>
|
#include <gui/missionselect_screen/MissionSelectPresenter.hpp>
|
||||||
|
#include <gui_generated/missionselect_screen/MissionSelectViewBase.hpp>
|
||||||
|
|
||||||
class MissionSelectView : public MissionSelectViewBase
|
class MissionSelectView : public MissionSelectViewBase {
|
||||||
{
|
|
||||||
public:
|
public:
|
||||||
MissionSelectView();
|
MissionSelectView();
|
||||||
virtual ~MissionSelectView() {}
|
virtual ~MissionSelectView() {}
|
||||||
virtual void setupScreen();
|
virtual void setupScreen();
|
||||||
virtual void tearDownScreen();
|
virtual void tearDownScreen();
|
||||||
|
|
||||||
|
void setSelectedMission(Mission mission);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
private:
|
||||||
|
MissionSelectElement *selected;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // MISSIONSELECTVIEW_HPP
|
#endif // MISSIONSELECTVIEW_HPP
|
||||||
|
|
|
@ -1,21 +1,24 @@
|
||||||
#ifndef MODEL_HPP
|
#ifndef MODEL_HPP
|
||||||
#define MODEL_HPP
|
#define MODEL_HPP
|
||||||
|
|
||||||
|
#include "stw_defines.h"
|
||||||
class ModelListener;
|
class ModelListener;
|
||||||
|
|
||||||
class Model
|
class Model {
|
||||||
{
|
|
||||||
public:
|
public:
|
||||||
Model();
|
Model();
|
||||||
|
|
||||||
void bind(ModelListener* listener)
|
void bind(ModelListener *listener) { modelListener = listener; }
|
||||||
{
|
|
||||||
modelListener = listener;
|
void tick();
|
||||||
}
|
|
||||||
|
Mission getCurrentMission() const { return mission; }
|
||||||
|
|
||||||
void tick();
|
|
||||||
protected:
|
protected:
|
||||||
ModelListener* modelListener;
|
ModelListener *modelListener;
|
||||||
|
|
||||||
|
private:
|
||||||
|
Mission mission;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // MODEL_HPP
|
#endif // MODEL_HPP
|
||||||
|
|
|
@ -3,19 +3,20 @@
|
||||||
|
|
||||||
#include <gui/model/Model.hpp>
|
#include <gui/model/Model.hpp>
|
||||||
|
|
||||||
class ModelListener
|
#include "stw_defines.h"
|
||||||
{
|
|
||||||
|
class ModelListener {
|
||||||
public:
|
public:
|
||||||
ModelListener() : model(0) {}
|
ModelListener() : model(0) {}
|
||||||
|
|
||||||
virtual ~ModelListener() {}
|
virtual ~ModelListener() {}
|
||||||
|
|
||||||
|
void bind(Model *m) { model = m; }
|
||||||
|
|
||||||
|
virtual void notifyMissionChanged(Mission newMission){};
|
||||||
|
|
||||||
void bind(Model* m)
|
|
||||||
{
|
|
||||||
model = m;
|
|
||||||
}
|
|
||||||
protected:
|
protected:
|
||||||
Model* model;
|
Model *model;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // MODELLISTENER_HPP
|
#endif // MODELLISTENER_HPP
|
||||||
|
|
|
@ -11,11 +11,21 @@ void MissionSelectElement::initialize() {
|
||||||
void MissionSelectElement::setUp(uint32_t i, TEXTS label) {
|
void MissionSelectElement::setUp(uint32_t i, TEXTS label) {
|
||||||
uint8_t val;
|
uint8_t val;
|
||||||
if (i % 2 == 0) {
|
if (i % 2 == 0) {
|
||||||
val = 0b1000;
|
|
||||||
} else {
|
|
||||||
val = 0b10000;
|
val = 0b10000;
|
||||||
|
} else {
|
||||||
|
val = 0b11000;
|
||||||
}
|
}
|
||||||
bg.setColor(touchgfx::Color::getColorFromRGB(val, val, val));
|
bgColor = touchgfx::Color::getColorFromRGB(val, val, val);
|
||||||
|
bg.setColor(bgColor);
|
||||||
|
|
||||||
text.setTypedText(TypedText(label));
|
text.setTypedText(TypedText(label));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MissionSelectElement::setSelected(bool selected) {
|
||||||
|
if (selected) {
|
||||||
|
bg.setColor(touchgfx::Color::getColorFromRGB(0xc5, 0x0e, 0x1f));
|
||||||
|
} else {
|
||||||
|
bg.setColor(bgColor);
|
||||||
|
}
|
||||||
|
bg.invalidate();
|
||||||
|
}
|
||||||
|
|
|
@ -1,18 +1,13 @@
|
||||||
#include <gui/missionselect_screen/MissionSelectView.hpp>
|
|
||||||
#include <gui/missionselect_screen/MissionSelectPresenter.hpp>
|
#include <gui/missionselect_screen/MissionSelectPresenter.hpp>
|
||||||
|
#include <gui/missionselect_screen/MissionSelectView.hpp>
|
||||||
|
|
||||||
MissionSelectPresenter::MissionSelectPresenter(MissionSelectView& v)
|
MissionSelectPresenter::MissionSelectPresenter(MissionSelectView &v)
|
||||||
: view(v)
|
: view(v) {}
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void MissionSelectPresenter::activate()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void MissionSelectPresenter::deactivate()
|
|
||||||
{
|
|
||||||
|
|
||||||
|
void MissionSelectPresenter::activate() {}
|
||||||
|
|
||||||
|
void MissionSelectPresenter::deactivate() {}
|
||||||
|
|
||||||
|
void MissionSelectPresenter::notifyMissionChanged(Mission mission) {
|
||||||
|
view.setSelectedMission(mission);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#include "texts/TextKeysAndLanguages.hpp"
|
#include "texts/TextKeysAndLanguages.hpp"
|
||||||
#include <gui/missionselect_screen/MissionSelectView.hpp>
|
#include <gui/missionselect_screen/MissionSelectView.hpp>
|
||||||
|
|
||||||
MissionSelectView::MissionSelectView() {}
|
MissionSelectView::MissionSelectView() : selected{nullptr} {}
|
||||||
|
|
||||||
void MissionSelectView::setupScreen() {
|
void MissionSelectView::setupScreen() {
|
||||||
MissionSelectViewBase::setupScreen();
|
MissionSelectViewBase::setupScreen();
|
||||||
|
@ -17,3 +17,36 @@ void MissionSelectView::setupScreen() {
|
||||||
void MissionSelectView::tearDownScreen() {
|
void MissionSelectView::tearDownScreen() {
|
||||||
MissionSelectViewBase::tearDownScreen();
|
MissionSelectViewBase::tearDownScreen();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MissionSelectView::setSelectedMission(Mission mission) {
|
||||||
|
if (selected != nullptr) {
|
||||||
|
selected->setSelected(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (mission) {
|
||||||
|
case MISSION_NONE:
|
||||||
|
break;
|
||||||
|
case MISSION_ACCEL:
|
||||||
|
selected = &accel;
|
||||||
|
break;
|
||||||
|
case MISSION_SKIDPAD:
|
||||||
|
selected = &skidpad;
|
||||||
|
break;
|
||||||
|
case MISSION_AUTOX:
|
||||||
|
selected = &autox;
|
||||||
|
break;
|
||||||
|
case MISSION_TRACKDRIVE:
|
||||||
|
selected = &trackdrive;
|
||||||
|
break;
|
||||||
|
case MISSION_EBS:
|
||||||
|
selected = &ebs;
|
||||||
|
break;
|
||||||
|
case MISSION_INSPECTION:
|
||||||
|
selected = &inspection;
|
||||||
|
break;
|
||||||
|
case MISSION_MANUAL:
|
||||||
|
selected = &manual;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
selected->setSelected(true);
|
||||||
|
}
|
||||||
|
|
|
@ -1,12 +1,43 @@
|
||||||
|
#include "main.h"
|
||||||
|
#include "stm32h7xx_hal_gpio.h"
|
||||||
|
#include "stw_defines.h"
|
||||||
|
#include "tx_api.h"
|
||||||
|
#include "ui.h"
|
||||||
#include <gui/model/Model.hpp>
|
#include <gui/model/Model.hpp>
|
||||||
#include <gui/model/ModelListener.hpp>
|
#include <gui/model/ModelListener.hpp>
|
||||||
|
|
||||||
Model::Model() : modelListener(0)
|
Model::Model() : modelListener(0), mission{MISSION_NONE} {}
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void Model::tick()
|
|
||||||
{
|
|
||||||
|
|
||||||
|
void Model::tick() {
|
||||||
|
UIMessage msg;
|
||||||
|
while (tx_queue_receive(&ui_queue, &msg, TX_NO_WAIT) == TX_SUCCESS) {
|
||||||
|
switch (msg.kind) {
|
||||||
|
case UMK_BTN_RELEASED:
|
||||||
|
// TODO: What do we do with this?
|
||||||
|
break;
|
||||||
|
case UMK_ENC_CW: {
|
||||||
|
int mission_int = static_cast<int>(mission);
|
||||||
|
mission_int++;
|
||||||
|
// mission_int = 0 is MISSION_NONE, which we don't want to select.
|
||||||
|
// NUM_MISSIONS is equal to the last mission, so check for strictly
|
||||||
|
// greater.
|
||||||
|
if (mission_int > NUM_MISSIONS) {
|
||||||
|
mission_int = 1;
|
||||||
|
}
|
||||||
|
mission = static_cast<Mission>(mission_int);
|
||||||
|
modelListener->notifyMissionChanged(mission);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case UMK_ENC_CCW:
|
||||||
|
int mission_int = static_cast<int>(mission);
|
||||||
|
mission_int--;
|
||||||
|
if (mission_int <= 0) {
|
||||||
|
mission_int = NUM_MISSIONS;
|
||||||
|
}
|
||||||
|
mission = static_cast<Mission>(mission_int);
|
||||||
|
modelListener->notifyMissionChanged(mission);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
HAL_GPIO_TogglePin(STATUS2_GPIO_Port, STATUS2_Pin);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,7 @@ $(error Spaces not allowed in path)
|
||||||
else
|
else
|
||||||
|
|
||||||
ADDITIONAL_SOURCES :=
|
ADDITIONAL_SOURCES :=
|
||||||
ADDITIONAL_INCLUDE_PATHS :=
|
ADDITIONAL_INCLUDE_PATHS := $(application_path)/../Core/Inc
|
||||||
ADDITIONAL_LIBRARY_PATHS :=
|
ADDITIONAL_LIBRARY_PATHS :=
|
||||||
ADDITIONAL_LIBRARIES :=
|
ADDITIONAL_LIBRARIES :=
|
||||||
export ADDITIONAL_SOURCES ADDITIONAL_INCLUDE_PATHS ADDITIONAL_LIBRARY_PATHS ADDITIONAL_LIBRARIES
|
export ADDITIONAL_SOURCES ADDITIONAL_INCLUDE_PATHS ADDITIONAL_LIBRARY_PATHS ADDITIONAL_LIBRARIES
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
"Name": "missionList",
|
"Name": "missionList",
|
||||||
"Y": 48,
|
"Y": 48,
|
||||||
"Width": 480,
|
"Width": 480,
|
||||||
"Height": 210,
|
"Height": 212,
|
||||||
"Direction": "South",
|
"Direction": "South",
|
||||||
"Components": [
|
"Components": [
|
||||||
{
|
{
|
||||||
|
@ -82,17 +82,32 @@
|
||||||
"Width": 480,
|
"Width": 480,
|
||||||
"Height": 30,
|
"Height": 30,
|
||||||
"CustomContainerDefinitionName": "MissionSelectElement"
|
"CustomContainerDefinitionName": "MissionSelectElement"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Type": "Line",
|
||||||
|
"Name": "lastLine",
|
||||||
|
"Y": 210,
|
||||||
|
"Width": 480,
|
||||||
|
"Height": 2,
|
||||||
|
"Color": {
|
||||||
|
"Red": 170,
|
||||||
|
"Green": 170,
|
||||||
|
"Blue": 170
|
||||||
|
},
|
||||||
|
"EndX": 480.0,
|
||||||
|
"LineWidth": 5.0,
|
||||||
|
"LineEndingStyle": "Round"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Type": "Image",
|
"Type": "Image",
|
||||||
"Name": "image1",
|
"Name": "logo",
|
||||||
"X": 160,
|
"X": 160,
|
||||||
"Y": 263,
|
"Y": 263,
|
||||||
"Width": 160,
|
"Width": 160,
|
||||||
"Height": 55,
|
"Height": 55,
|
||||||
"RelativeFilename": "Fasttube_Logo_small_white.png"
|
"RelativeFilename": "logo_dv_small_white.png"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"Interactions": []
|
"Interactions": []
|
||||||
|
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 6.5 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 49 KiB |
|
@ -0,0 +1,69 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg
|
||||||
|
version="1.0"
|
||||||
|
width="1600"
|
||||||
|
height="547"
|
||||||
|
viewBox="0 0 16000 5470"
|
||||||
|
preserveAspectRatio="xMidYMid"
|
||||||
|
id="svg75"
|
||||||
|
sodipodi:docname="logo_dv.svg"
|
||||||
|
inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg">
|
||||||
|
<defs
|
||||||
|
id="defs79" />
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="namedview77"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#000000"
|
||||||
|
borderopacity="0.25"
|
||||||
|
inkscape:showpageshadow="2"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pagecheckerboard="0"
|
||||||
|
inkscape:deskcolor="#d1d1d1"
|
||||||
|
showgrid="false"
|
||||||
|
inkscape:zoom="0.51584915"
|
||||||
|
inkscape:cx="772.51266"
|
||||||
|
inkscape:cy="215.17919"
|
||||||
|
inkscape:window-width="1676"
|
||||||
|
inkscape:window-height="991"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:window-y="0"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:current-layer="layer101" />
|
||||||
|
<g
|
||||||
|
id="layer101"
|
||||||
|
fill="#000000"
|
||||||
|
stroke="none">
|
||||||
|
<path
|
||||||
|
d="m 0,5023 c 0,-511 6,-596 46,-678 48,-97 149,-173 276,-206 67,-18 121,-19 820,-19 h 748 v 170 170 H 1125 360 v 75 75 h 765 765 v 170 170 H 1125 360 v 260 260 H 180 0 Z"
|
||||||
|
id="path56" />
|
||||||
|
<path
|
||||||
|
d="m 2235,5455 c -121,-34 -234,-125 -287,-233 -32,-64 -33,-72 -33,-182 0,-107 2,-119 29,-175 40,-81 129,-168 208,-204 104,-47 160,-51 792,-51 h 586 v -75 -75 h -775 -775 v -170 -170 l 808,2 807,3 55,28 c 92,48 167,133 215,247 18,42 19,80 23,558 l 3,512 -803,-1 c -644,-1 -813,-3 -853,-14 z m 1295,-415 v -80 h -625 -625 v 80 80 h 625 625 z"
|
||||||
|
id="path58" />
|
||||||
|
<path
|
||||||
|
d="m 4062,5298 3,-173 828,-3 827,-2 v -74 -75 l -687,-3 c -622,-3 -692,-5 -733,-21 -136,-52 -231,-132 -282,-235 -59,-120 -50,-271 23,-378 39,-58 113,-121 181,-155 119,-60 98,-59 970,-59 h 798 v 170 170 h -815 -815 v 75 75 h 663 c 532,0 672,3 712,14 164,45 284,153 330,294 26,80 18,219 -16,293 -51,108 -161,200 -287,239 -62,19 -94,20 -883,20 h -819 z"
|
||||||
|
id="path60" />
|
||||||
|
<path
|
||||||
|
d="m 6890,4965 v -505 h -390 -390 v -170 -170 h 1905 1905 v 170 170 h -390 -390 v 505 505 h -180 -180 v -505 -505 h -765 -765 v 505 505 h -180 -180 z"
|
||||||
|
id="path62" />
|
||||||
|
<path
|
||||||
|
d="m 10253,5446 c -142,-53 -260,-192 -292,-344 -7,-35 -11,-214 -11,-517 v -465 h 180 180 v 500 500 h 630 630 v -500 -500 h 180 181 l -3,518 -3,517 -27,57 c -49,104 -162,204 -272,241 -44,15 -119,17 -680,16 h -631 z"
|
||||||
|
id="path64" />
|
||||||
|
<path
|
||||||
|
d="m 12030,4795 v -676 l 823,3 822,3 56,23 c 140,56 217,146 246,287 19,93 9,166 -37,280 l -28,70 28,50 c 80,143 91,277 33,396 -53,106 -153,185 -282,221 -61,17 -121,18 -863,18 h -798 z m 1600,250 v -75 h -625 -625 v 75 75 h 625 625 z m -20,-510 v -75 h -615 -615 v 75 75 h 615 615 z"
|
||||||
|
id="path66" />
|
||||||
|
<path
|
||||||
|
d="m 14415,5453 c -105,-32 -212,-118 -271,-218 l -29,-50 v -385 -385 l 29,-59 c 16,-33 49,-79 73,-104 51,-51 164,-107 245,-122 36,-7 265,-10 645,-8 l 588,3 59,30 c 118,60 199,158 231,280 11,45 15,115 15,297 v 238 h -770 -770 v 75 75 h 770 770 v 175 175 l -767,-1 c -655,-1 -775,-3 -818,-16 z m 1225,-918 v -75 h -590 -590 v 75 75 h 590 590 z"
|
||||||
|
id="path68" />
|
||||||
|
<path
|
||||||
|
d="m 0,3830 v -40 h 204 205 l 6,-47 c 36,-255 170,-590 317,-788 281,-379 688,-639 1128,-719 309,-56 547,-46 844,36 344,95 681,312 891,573 22,28 43,52 46,55 39,35 203,314 237,405 70,188 122,381 122,454 v 31 l 1872,-2 1871,-3 10,-30 c 19,-59 137,-352 175,-436 l 40,-86 -92,-6 c -50,-4 -145,-11 -211,-17 -66,-5 -203,-16 -305,-25 -248,-20 -566,-53 -720,-74 -36,-5 -105,-14 -155,-20 -248,-31 -658,-105 -915,-167 -743,-176 -1323,-428 -1730,-751 -47,-37 -137,-119 -201,-183 -95,-94 -117,-122 -123,-153 -15,-80 26,-134 121,-161 76,-22 153,-27 543,-36 372,-9 438,-16 474,-51 19,-18 20,-41 24,-804 l 5,-785 h 93 94 l -2,844 -3,844 -24,26 c -79,84 -235,108 -799,122 l -284,7 44,41 c 217,205 475,373 808,524 93,42 238,102 285,117 22,8 87,30 145,50 130,46 381,118 520,150 263,60 529,113 705,140 55,9 127,20 160,25 33,6 98,15 145,20 47,6 119,15 160,20 68,9 204,23 475,50 55,6 183,17 285,25 102,8 244,19 315,25 72,6 201,17 288,24 86,7 159,15 161,17 3,2 -19,51 -48,109 -84,170 -256,572 -256,601 0,5 349,8 893,7 l 892,-3 3,-25 c 5,-50 34,-186 49,-235 190,-625 654,-1059 1298,-1214 22,-6 94,-17 160,-26 453,-58 913,66 1285,349 99,75 277,260 353,366 77,109 182,314 227,444 27,80 57,201 75,309 l 6,37 h 1003 1003 l 53,-107 c 47,-96 67,-138 127,-271 24,-53 50,-135 57,-179 7,-36 4,-45 -24,-77 -63,-71 -249,-175 -530,-294 -215,-92 -696,-260 -1015,-357 -346,-104 -387,-115 -625,-179 -681,-181 -1406,-333 -1980,-415 -41,-6 -104,-16 -140,-21 -36,-6 -114,-17 -175,-25 -60,-8 -144,-19 -185,-25 -74,-10 -270,-32 -445,-51 -211,-22 -643,-49 -800,-49 -177,0 -320,17 -371,43 -30,15 -225,154 -234,166 -3,4 -21,19 -41,34 -33,25 -43,27 -125,26 -49,0 -107,-3 -129,-7 l -40,-7 45,-50 c 51,-56 134,-135 176,-167 16,-12 31,-25 34,-29 10,-14 166,-107 222,-132 129,-59 285,-73 643,-57 369,16 755,52 1200,110 560,73 1221,187 1625,281 47,10 123,28 170,39 419,95 889,216 1200,306 666,195 1182,392 1435,549 199,123 309,219 320,279 17,87 -32,229 -184,534 -33,68 -61,126 -61,128 0,2 133,4 295,4 h 295 v 40 40 H 7995 0 Z m 3805,-87 c -20,-136 -94,-357 -162,-483 -89,-163 -158,-256 -287,-386 -116,-116 -169,-158 -286,-230 -282,-175 -536,-247 -865,-247 -184,1 -315,19 -470,66 -284,87 -547,255 -737,472 -174,199 -308,454 -363,690 -30,130 -35,154 -35,159 0,3 723,6 1606,6 h 1606 z m 9190,25 c -44,-203 -70,-285 -126,-406 -36,-79 -133,-242 -170,-287 -214,-259 -411,-406 -694,-514 -395,-151 -857,-126 -1240,66 -434,219 -758,655 -831,1121 l -7,42 h 1537 1536 z"
|
||||||
|
id="path70" />
|
||||||
|
<path
|
||||||
|
d="m 8040,2320 c -612,-31 -1114,-101 -1440,-202 -456,-141 -725,-281 -811,-424 -62.6204,-107.1874 55.1349,-206.2168 209,-52 118,127 421,262 737,328 59,12 251,49 315,60 120,21 413,57 585,71 315,25 420,30 753,36 193,3 352,8 352,12 0,3 -10,17 -23,31 -12,14 -38,45 -57,70 -19,25 -42,53 -50,62 -13,16 -35,18 -220,16 -113,-1 -270,-4 -350,-8 z"
|
||||||
|
id="path72"
|
||||||
|
sodipodi:nodetypes="ccccccccscsccc" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 6.0 KiB |
After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 3.0 KiB |
|
@ -133,6 +133,9 @@ MxDb.Version=DB.6.0.70
|
||||||
NRST.Locked=true
|
NRST.Locked=true
|
||||||
NVIC.BusFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false\:false
|
NVIC.BusFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false\:false
|
||||||
NVIC.DebugMonitor_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false\:false
|
NVIC.DebugMonitor_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false\:false
|
||||||
|
NVIC.EXTI3_IRQn=true\:0\:0\:false\:false\:true\:false\:true\:true\:true
|
||||||
|
NVIC.EXTI4_IRQn=true\:0\:0\:false\:false\:true\:false\:true\:true\:true
|
||||||
|
NVIC.EXTI9_5_IRQn=true\:0\:0\:false\:false\:true\:false\:true\:true\:true
|
||||||
NVIC.ForceEnableDMAVector=true
|
NVIC.ForceEnableDMAVector=true
|
||||||
NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false\:false
|
NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false\:false
|
||||||
NVIC.LTDC_IRQn=true\:0\:0\:false\:false\:true\:false\:true\:true\:true
|
NVIC.LTDC_IRQn=true\:0\:0\:false\:false\:true\:false\:true\:true\:true
|
||||||
|
@ -291,48 +294,58 @@ PE13.Signal=S_TIM1_CH3
|
||||||
PE2.Locked=true
|
PE2.Locked=true
|
||||||
PE2.Mode=OCTOSPI1_IOL_Port1L
|
PE2.Mode=OCTOSPI1_IOL_Port1L
|
||||||
PE2.Signal=OCTOSPIM_P1_IO2
|
PE2.Signal=OCTOSPIM_P1_IO2
|
||||||
PE3.GPIOParameters=GPIO_Label
|
PE3.GPIOParameters=GPIO_Label,GPIO_ModeDefaultEXTI
|
||||||
PE3.GPIO_Label=ENC1A
|
PE3.GPIO_Label=ENC1A
|
||||||
|
PE3.GPIO_ModeDefaultEXTI=GPIO_MODE_IT_RISING_FALLING
|
||||||
PE3.Locked=true
|
PE3.Locked=true
|
||||||
PE3.Signal=GPIO_Input
|
PE3.Signal=GPXTI3
|
||||||
PE4.GPIOParameters=GPIO_Label
|
PE4.GPIOParameters=GPIO_Label,GPIO_ModeDefaultEXTI
|
||||||
PE4.GPIO_Label=ENC1B
|
PE4.GPIO_Label=ENC1B
|
||||||
|
PE4.GPIO_ModeDefaultEXTI=GPIO_MODE_IT_RISING_FALLING
|
||||||
PE4.Locked=true
|
PE4.Locked=true
|
||||||
PE4.Signal=GPIO_Input
|
PE4.Signal=GPXTI4
|
||||||
PE5.GPIOParameters=GPIO_Label
|
PE5.GPIOParameters=GPIO_Label,GPIO_ModeDefaultEXTI
|
||||||
PE5.GPIO_Label=ENC2A
|
PE5.GPIO_Label=ENC2A
|
||||||
|
PE5.GPIO_ModeDefaultEXTI=GPIO_MODE_IT_RISING_FALLING
|
||||||
PE5.Locked=true
|
PE5.Locked=true
|
||||||
PE5.Signal=GPIO_Input
|
PE5.Signal=GPXTI5
|
||||||
PE6.GPIOParameters=GPIO_Label
|
PE6.GPIOParameters=GPIO_Label,GPIO_ModeDefaultEXTI
|
||||||
PE6.GPIO_Label=ENC2B
|
PE6.GPIO_Label=ENC2B
|
||||||
|
PE6.GPIO_ModeDefaultEXTI=GPIO_MODE_IT_RISING_FALLING
|
||||||
PE6.Locked=true
|
PE6.Locked=true
|
||||||
PE6.Signal=GPIO_Input
|
PE6.Signal=GPXTI6
|
||||||
PE9.GPIOParameters=GPIO_Label
|
PE9.GPIOParameters=GPIO_Label
|
||||||
PE9.GPIO_Label=PWM_R
|
PE9.GPIO_Label=PWM_R
|
||||||
PE9.Locked=true
|
PE9.Locked=true
|
||||||
PE9.Signal=S_TIM1_CH1
|
PE9.Signal=S_TIM1_CH1
|
||||||
PF0.GPIOParameters=GPIO_Label
|
PF0.GPIOParameters=GPIO_PuPd,GPIO_Label
|
||||||
PF0.GPIO_Label=BTN1
|
PF0.GPIO_Label=BTN1
|
||||||
|
PF0.GPIO_PuPd=GPIO_NOPULL
|
||||||
PF0.Locked=true
|
PF0.Locked=true
|
||||||
PF0.Signal=GPIO_Input
|
PF0.Signal=GPIO_Input
|
||||||
PF1.GPIOParameters=GPIO_Label
|
PF1.GPIOParameters=GPIO_PuPd,GPIO_Label
|
||||||
PF1.GPIO_Label=BTN2
|
PF1.GPIO_Label=BTN2
|
||||||
|
PF1.GPIO_PuPd=GPIO_NOPULL
|
||||||
PF1.Locked=true
|
PF1.Locked=true
|
||||||
PF1.Signal=GPIO_Input
|
PF1.Signal=GPIO_Input
|
||||||
PF2.GPIOParameters=GPIO_Label
|
PF2.GPIOParameters=GPIO_PuPd,GPIO_Label
|
||||||
PF2.GPIO_Label=BTN3
|
PF2.GPIO_Label=BTN3
|
||||||
|
PF2.GPIO_PuPd=GPIO_NOPULL
|
||||||
PF2.Locked=true
|
PF2.Locked=true
|
||||||
PF2.Signal=GPIO_Input
|
PF2.Signal=GPIO_Input
|
||||||
PF3.GPIOParameters=GPIO_Label
|
PF3.GPIOParameters=GPIO_PuPd,GPIO_Label
|
||||||
PF3.GPIO_Label=BTN4
|
PF3.GPIO_Label=BTN4
|
||||||
|
PF3.GPIO_PuPd=GPIO_NOPULL
|
||||||
PF3.Locked=true
|
PF3.Locked=true
|
||||||
PF3.Signal=GPIO_Input
|
PF3.Signal=GPIO_Input
|
||||||
PF4.GPIOParameters=GPIO_Label
|
PF4.GPIOParameters=GPIO_PuPd,GPIO_Label
|
||||||
PF4.GPIO_Label=BTN5
|
PF4.GPIO_Label=BTN5
|
||||||
|
PF4.GPIO_PuPd=GPIO_NOPULL
|
||||||
PF4.Locked=true
|
PF4.Locked=true
|
||||||
PF4.Signal=GPIO_Input
|
PF4.Signal=GPIO_Input
|
||||||
PF5.GPIOParameters=GPIO_Label
|
PF5.GPIOParameters=GPIO_PuPd,GPIO_Label
|
||||||
PF5.GPIO_Label=BTN6
|
PF5.GPIO_Label=BTN6
|
||||||
|
PF5.GPIO_PuPd=GPIO_NOPULL
|
||||||
PF5.Locked=true
|
PF5.Locked=true
|
||||||
PF5.Signal=GPIO_Input
|
PF5.Signal=GPIO_Input
|
||||||
PF6.Locked=true
|
PF6.Locked=true
|
||||||
|
@ -393,7 +406,7 @@ ProjectManager.StackSize=0x400
|
||||||
ProjectManager.TargetToolchain=Makefile
|
ProjectManager.TargetToolchain=Makefile
|
||||||
ProjectManager.ToolChainLocation=
|
ProjectManager.ToolChainLocation=
|
||||||
ProjectManager.UnderRoot=false
|
ProjectManager.UnderRoot=false
|
||||||
ProjectManager.functionlistsort=1-SystemClock_Config-RCC-false-HAL-false,2-MX_GPIO_Init-GPIO-false-HAL-true,3-MX_DMA2D_Init-DMA2D-false-HAL-true,4-MX_FDCAN1_Init-FDCAN1-false-HAL-true,5-MX_LTDC_Init-LTDC-false-HAL-true,6-MX_JPEG_Init-JPEG-false-HAL-true,7-MX_OCTOSPI1_Init-OCTOSPI1-false-HAL-true,8-MX_SPI3_Init-SPI3-false-HAL-true,9-MX_TIM1_Init-TIM1-false-HAL-true,10-MX_TIM2_Init-TIM2-false-HAL-true,11-MX_TIM4_Init-TIM4-false-HAL-true,12-MX_CRC_Init-CRC-false-HAL-true,13-MX_TouchGFX_Init-STMicroelectronics.X-CUBE-TOUCHGFX.4.21.2-false-HAL-false,14-MX_TouchGFX_Process-STMicroelectronics.X-CUBE-TOUCHGFX.4.21.2-false-HAL-false,0-MX_CORTEX_M7_Init-CORTEX_M7-false-HAL-true
|
ProjectManager.functionlistsort=1-SystemClock_Config-RCC-false-HAL-false,2-MX_GPIO_Init-GPIO-false-HAL-true,3-MX_DMA2D_Init-DMA2D-false-HAL-true,4-MX_FDCAN1_Init-FDCAN1-false-HAL-true,5-MX_LTDC_Init-LTDC-false-HAL-true,6-MX_JPEG_Init-JPEG-false-HAL-true,7-MX_OCTOSPI1_Init-OCTOSPI1-false-HAL-true,8-MX_SPI3_Init-SPI3-false-HAL-true,9-MX_TIM1_Init-TIM1-false-HAL-true,10-MX_TIM2_Init-TIM2-false-HAL-true,11-MX_TIM4_Init-TIM4-false-HAL-true,12-MX_CRC_Init-CRC-false-HAL-true,14-MX_TouchGFX_Init-STMicroelectronics.X-CUBE-TOUCHGFX.4.21.2-false-HAL-false,15-MX_TouchGFX_Process-STMicroelectronics.X-CUBE-TOUCHGFX.4.21.2-false-HAL-false,0-MX_CORTEX_M7_Init-CORTEX_M7-false-HAL-true
|
||||||
RCC.ADCFreq_Value=129000000
|
RCC.ADCFreq_Value=129000000
|
||||||
RCC.AHB12Freq_Value=64000000
|
RCC.AHB12Freq_Value=64000000
|
||||||
RCC.AHB4Freq_Value=64000000
|
RCC.AHB4Freq_Value=64000000
|
||||||
|
@ -477,6 +490,14 @@ RCC.VCO3OutputFreq_Value=128000000
|
||||||
RCC.VCOInput1Freq_Value=16000000
|
RCC.VCOInput1Freq_Value=16000000
|
||||||
RCC.VCOInput2Freq_Value=2000000
|
RCC.VCOInput2Freq_Value=2000000
|
||||||
RCC.VCOInput3Freq_Value=16000000
|
RCC.VCOInput3Freq_Value=16000000
|
||||||
|
SH.GPXTI3.0=GPIO_EXTI3
|
||||||
|
SH.GPXTI3.ConfNb=1
|
||||||
|
SH.GPXTI4.0=GPIO_EXTI4
|
||||||
|
SH.GPXTI4.ConfNb=1
|
||||||
|
SH.GPXTI5.0=GPIO_EXTI5
|
||||||
|
SH.GPXTI5.ConfNb=1
|
||||||
|
SH.GPXTI6.0=GPIO_EXTI6
|
||||||
|
SH.GPXTI6.ConfNb=1
|
||||||
SH.S_TIM1_CH1.0=TIM1_CH1,PWM Generation1 CH1
|
SH.S_TIM1_CH1.0=TIM1_CH1,PWM Generation1 CH1
|
||||||
SH.S_TIM1_CH1.ConfNb=1
|
SH.S_TIM1_CH1.ConfNb=1
|
||||||
SH.S_TIM1_CH2.0=TIM1_CH2,PWM Generation2 CH2
|
SH.S_TIM1_CH2.0=TIM1_CH2,PWM Generation2 CH2
|
||||||
|
|