Increased max PWM to 25%.

This commit is contained in:
Chris Trimble 2024-07-12 11:29:29 -05:00
parent ab5aff3282
commit 3a86b52431
4 changed files with 7446 additions and 9 deletions

View File

@ -3,7 +3,7 @@
#define _VERSION_H #define _VERSION_H
#define VERSION_MAJOR (1) #define VERSION_MAJOR (1)
#define VERSION_MINOR (0) #define VERSION_MINOR (0)
#define VERSION_PATCH (2) #define VERSION_PATCH (3)
#define VERSION_STR "V1.0.2" #define VERSION_STR "V1.0.3"
#endif #endif

View File

@ -206,11 +206,13 @@ int main(void)
{ {
prev_uart_tick = HAL_GetTick(); prev_uart_tick = HAL_GetTick();
int len = snprintf(buf, 128, "Master\tCh1\tCh2\tCh3\tCh4\t\r\n"); int len = snprintf(buf, 512, "Master\tCh1\tCh2\tCh3\tCh4\t\r\n");
CDC_Transmit_FS((uint8_t *)buf, len);
len = snprintf(buf, 128, "%03.1f\t%03.1f\t%03.1f\t%03.1f\t%03.1f\t\r\n", len += snprintf((buf + len), (512 - len), "%03.1f\t%03.1f\t%03.1f\t%03.1f\t%03.1f\t\r\n",
m_sliders[0], m_sliders[1], m_sliders[2], m_sliders[3], m_sliders[4]); m_sliders[0], m_sliders[1], m_sliders[2], m_sliders[3], m_sliders[4]);
len += snprintf((buf + len), (512 - len), "Version: %s\r\n", VERSION_STR);
CDC_Transmit_FS((uint8_t *)buf, len); CDC_Transmit_FS((uint8_t *)buf, len);
} }
@ -329,10 +331,10 @@ void filter_adc2(void)
*/ */
void set_pwm_outputs(void) void set_pwm_outputs(void)
{ {
float ch1 = map_clamp(m_sliders[1], 0.0f, 100.0f, 0, (MAX_PWM_VALUE * 0.05f)); float ch1 = map_clamp(m_sliders[1], 0.0f, 100.0f, 0, (MAX_PWM_VALUE * 0.25f));
float ch2 = map_clamp(m_sliders[2], 0.0f, 100.0f, 0, (MAX_PWM_VALUE * 0.05f)); float ch2 = map_clamp(m_sliders[2], 0.0f, 100.0f, 0, (MAX_PWM_VALUE * 0.25f));
float ch3 = map_clamp(m_sliders[3], 0.0f, 100.0f, 0, (MAX_PWM_VALUE * 0.05f)); float ch3 = map_clamp(m_sliders[3], 0.0f, 100.0f, 0, (MAX_PWM_VALUE * 0.25f));
float ch4 = map_clamp(m_sliders[4], 0.0f, 100.0f, 0, (MAX_PWM_VALUE * 0.05f)); float ch4 = map_clamp(m_sliders[4], 0.0f, 100.0f, 0, (MAX_PWM_VALUE * 0.25f));
htim1.Instance->CCR1 = (uint32_t)(ch1); htim1.Instance->CCR1 = (uint32_t)(ch1);
htim1.Instance->CCR2 = (uint32_t)(ch2); htim1.Instance->CCR2 = (uint32_t)(ch2);

3712
Releases/FW_1-0-0.hex Normal file

File diff suppressed because it is too large Load Diff

3723
Releases/FW_1-0-3.hex Normal file

File diff suppressed because it is too large Load Diff