Comment, spacing cleanup
This commit is contained in:
parent
dd92c79339
commit
b643a07b66
@ -113,7 +113,7 @@ bool PersistentStore::access_start() {
|
|||||||
// This must be the first time since power on that we have accessed the storage, or someone
|
// This must be the first time since power on that we have accessed the storage, or someone
|
||||||
// loaded and called write_data and never called access_finish.
|
// loaded and called write_data and never called access_finish.
|
||||||
// Lets go looking for the slot that holds our configuration.
|
// Lets go looking for the slot that holds our configuration.
|
||||||
if (eeprom_data_written) DEBUG_ECHOLN("Dangling EEPROM write_data");
|
if (eeprom_data_written) DEBUG_ECHOLNPGM("Dangling EEPROM write_data");
|
||||||
uint32_t address = FLASH_ADDRESS_START;
|
uint32_t address = FLASH_ADDRESS_START;
|
||||||
while (address <= FLASH_ADDRESS_END) {
|
while (address <= FLASH_ADDRESS_END) {
|
||||||
uint32_t address_value = (*(__IO uint32_t*)address);
|
uint32_t address_value = (*(__IO uint32_t*)address);
|
||||||
|
@ -32,7 +32,7 @@ void set_pwm_frequency(const pin_t pin, int f_desired) {
|
|||||||
|
|
||||||
PinName pin_name = digitalPinToPinName(pin);
|
PinName pin_name = digitalPinToPinName(pin);
|
||||||
TIM_TypeDef *Instance = (TIM_TypeDef *)pinmap_peripheral(pin_name, PinMap_PWM); // Get HAL timer instance
|
TIM_TypeDef *Instance = (TIM_TypeDef *)pinmap_peripheral(pin_name, PinMap_PWM); // Get HAL timer instance
|
||||||
|
|
||||||
LOOP_S_L_N(i, 0, NUM_HARDWARE_TIMERS) // Protect used timers
|
LOOP_S_L_N(i, 0, NUM_HARDWARE_TIMERS) // Protect used timers
|
||||||
if (timer_instance[i] && timer_instance[i]->getHandle()->Instance == Instance)
|
if (timer_instance[i] && timer_instance[i]->getHandle()->Instance == Instance)
|
||||||
return;
|
return;
|
||||||
|
@ -34,9 +34,7 @@
|
|||||||
#include "watchdog.h"
|
#include "watchdog.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The watchdog clock is 40Khz. We need a 4 seconds interval, so use a /256 preescaler and
|
* The watchdog clock is 40Khz. So for a 4s or 8s interval use a /256 preescaler and 625 or 1250 reload value (counts down to 0).
|
||||||
* 625 reload value (counts down to 0)
|
|
||||||
* use 1250 for 8 seconds
|
|
||||||
*/
|
*/
|
||||||
#define STM32F1_WD_RELOAD TERN(WATCHDOG_DURATION_8S, 1250, 625) // 4 or 8 second timeout
|
#define STM32F1_WD_RELOAD TERN(WATCHDOG_DURATION_8S, 1250, 625) // 4 or 8 second timeout
|
||||||
|
|
||||||
@ -56,7 +54,7 @@ void watchdogSetup() {
|
|||||||
*
|
*
|
||||||
* @return No return
|
* @return No return
|
||||||
*
|
*
|
||||||
* @details The watchdog clock is 40Khz. We need a 4 seconds interval, so use a /256 preescaler and 625 reload value (counts down to 0)
|
* @details The watchdog clock is 40Khz. So for a 4s or 8s interval use a /256 preescaler and 625 or 1250 reload value (counts down to 0).
|
||||||
*/
|
*/
|
||||||
void watchdog_init() {
|
void watchdog_init() {
|
||||||
#if DISABLED(DISABLE_WATCHDOG_INIT)
|
#if DISABLED(DISABLE_WATCHDOG_INIT)
|
||||||
|
@ -27,11 +27,9 @@
|
|||||||
|
|
||||||
#include <libmaple/iwdg.h>
|
#include <libmaple/iwdg.h>
|
||||||
|
|
||||||
// Arduino STM32F1 core now has watchdog support
|
// Initialize watchdog with a 4 or 8 second countdown time
|
||||||
|
|
||||||
// Initialize watchdog with a 4 second countdown time
|
|
||||||
void watchdog_init();
|
void watchdog_init();
|
||||||
|
|
||||||
// Reset watchdog. MUST be called at least every 4 seconds after the
|
// Reset watchdog. MUST be called every 4 or 8 seconds after the
|
||||||
// first watchdog_init or STM32F1 will reset.
|
// first watchdog_init or the STM32F1 will reset.
|
||||||
void HAL_watchdog_refresh();
|
void HAL_watchdog_refresh();
|
||||||
|
@ -113,7 +113,7 @@ void GcodeSuite::M3_M4(const bool is_M4) {
|
|||||||
else
|
else
|
||||||
cutter.set_power(cutter.upower_to_ocr(get_s_power()));
|
cutter.set_power(cutter.upower_to_ocr(get_s_power()));
|
||||||
#elif ENABLED(SPINDLE_SERVO)
|
#elif ENABLED(SPINDLE_SERVO)
|
||||||
cutter.set_power(get_s_power());
|
cutter.set_power(get_s_power());
|
||||||
#else
|
#else
|
||||||
cutter.set_enabled(true);
|
cutter.set_enabled(true);
|
||||||
#endif
|
#endif
|
||||||
|
@ -675,6 +675,10 @@
|
|||||||
#define HAS_BED_PROBE 1
|
#define HAS_BED_PROBE 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL)
|
||||||
|
#undef PROBE_MANUALLY
|
||||||
|
#endif
|
||||||
|
|
||||||
#if ANY(HAS_BED_PROBE, PROBE_MANUALLY, MESH_BED_LEVELING)
|
#if ANY(HAS_BED_PROBE, PROBE_MANUALLY, MESH_BED_LEVELING)
|
||||||
#define PROBE_SELECTED 1
|
#define PROBE_SELECTED 1
|
||||||
#endif
|
#endif
|
||||||
@ -747,6 +751,7 @@
|
|||||||
#define HAS_PROBING_PROCEDURE 1
|
#define HAS_PROBING_PROCEDURE 1
|
||||||
#endif
|
#endif
|
||||||
#if !HAS_LEVELING
|
#if !HAS_LEVELING
|
||||||
|
#undef PROBE_MANUALLY
|
||||||
#undef RESTORE_LEVELING_AFTER_G28
|
#undef RESTORE_LEVELING_AFTER_G28
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1382,9 +1382,6 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
|||||||
* Unified Bed Leveling
|
* Unified Bed Leveling
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Hide PROBE_MANUALLY from the rest of the code
|
|
||||||
#undef PROBE_MANUALLY
|
|
||||||
|
|
||||||
#if IS_SCARA
|
#if IS_SCARA
|
||||||
#error "AUTO_BED_LEVELING_UBL does not yet support SCARA printers."
|
#error "AUTO_BED_LEVELING_UBL does not yet support SCARA printers."
|
||||||
#elif DISABLED(EEPROM_SETTINGS)
|
#elif DISABLED(EEPROM_SETTINGS)
|
||||||
@ -1410,13 +1407,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
|||||||
|
|
||||||
#elif ENABLED(MESH_BED_LEVELING)
|
#elif ENABLED(MESH_BED_LEVELING)
|
||||||
|
|
||||||
// Hide PROBE_MANUALLY from the rest of the code
|
// Mesh Bed Leveling
|
||||||
#undef PROBE_MANUALLY
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Mesh Bed Leveling
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if ENABLED(DELTA)
|
#if ENABLED(DELTA)
|
||||||
#error "MESH_BED_LEVELING is not compatible with DELTA printers."
|
#error "MESH_BED_LEVELING is not compatible with DELTA printers."
|
||||||
#elif GRID_MAX_POINTS_X > 9 || GRID_MAX_POINTS_Y > 9
|
#elif GRID_MAX_POINTS_X > 9 || GRID_MAX_POINTS_Y > 9
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
#if ENABLED(DGUS_LCD_UI_FYSETC)
|
#if ENABLED(DGUS_LCD_UI_FYSETC)
|
||||||
|
|
||||||
#include "../DGUSDisplayDef.h"
|
#include "DGUSDisplayDef.h"
|
||||||
#include "../DGUSDisplay.h"
|
#include "../DGUSDisplay.h"
|
||||||
#include "../DGUSScreenHandler.h"
|
#include "../DGUSScreenHandler.h"
|
||||||
|
|
||||||
|
@ -21,6 +21,8 @@
|
|||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include "../DGUSDisplayDef.h"
|
||||||
|
|
||||||
enum DGUSLCD_Screens : uint8_t {
|
enum DGUSLCD_Screens : uint8_t {
|
||||||
DGUSLCD_SCREEN_BOOT = 0,
|
DGUSLCD_SCREEN_BOOT = 0,
|
||||||
DGUSLCD_SCREEN_MAIN = 1,
|
DGUSLCD_SCREEN_MAIN = 1,
|
||||||
|
@ -256,7 +256,7 @@
|
|||||||
* ----- -----
|
* ----- -----
|
||||||
* LCD LCD
|
* LCD LCD
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define LCD_PINS_RS P1_23
|
#define LCD_PINS_RS P1_23
|
||||||
|
|
||||||
#define BTN_EN1 P1_20
|
#define BTN_EN1 P1_20
|
||||||
|
@ -13,10 +13,10 @@ env.Append(CXXFLAGS=[
|
|||||||
|
|
||||||
# Useful for JTAG debugging
|
# Useful for JTAG debugging
|
||||||
#
|
#
|
||||||
# It will separe release and debug build folders.
|
# It will separe release and debug build folders.
|
||||||
# It useful when we need keep two live versions: one debug, for debugging,
|
# It useful when we need keep two live versions: one debug, for debugging,
|
||||||
# other release, for flashing.
|
# other release, for flashing.
|
||||||
# Without this, PIO will recompile everything twice for any small change.
|
# Without this, PIO will recompile everything twice for any small change.
|
||||||
#
|
#
|
||||||
if env.GetBuildType() == "debug":
|
if env.GetBuildType() == "debug":
|
||||||
env['BUILD_DIR'] = '$PROJECT_BUILD_DIR/$PIOENV/debug'
|
env['BUILD_DIR'] = '$PROJECT_BUILD_DIR/$PIOENV/debug'
|
||||||
|
Loading…
Reference in New Issue
Block a user