mirror of
https://github.com/bdring/Grbl_Esp32.git
synced 2025-08-30 17:49:56 +02:00
Merge branch 'YamlSettings' of https://github.com/bdring/Grbl_Esp32 into YamlSettings
This commit is contained in:
@@ -86,3 +86,8 @@ probe:
|
||||
PWM:
|
||||
output_pin: gpio.2
|
||||
enable_pin: gpio.22
|
||||
pwm_off: 0.0
|
||||
pwm_min: 0.0
|
||||
pwm_max: 100.0
|
||||
min_rpm: 0
|
||||
max_rpm: 1000
|
||||
|
@@ -505,7 +505,7 @@ size_t MachineConfig::readFile(const char* filename, char*& buffer) {
|
||||
file.close();
|
||||
buffer[filesize] = 0;
|
||||
|
||||
log_debug("Read config file:\r\n" << buffer);
|
||||
log_debug("Read config file:" << buffer);
|
||||
|
||||
if (pos != filesize) {
|
||||
delete[] buffer;
|
||||
|
@@ -86,3 +86,8 @@ probe:
|
||||
pwm:
|
||||
output_pin: gpio.2
|
||||
enable_pin: gpio.22
|
||||
pwm_off: 0.0
|
||||
pwm_min: 0.0
|
||||
pwm_max: 100.0
|
||||
min_rpm: 0
|
||||
max_rpm: 1000
|
||||
|
@@ -54,9 +54,9 @@ namespace Spindles {
|
||||
handler.item("max_rpm", _max_rpm);
|
||||
|
||||
handler.item("pwm_freq", _pwm_freq);
|
||||
handler.item("pwm_off", _pwm_off_setting);
|
||||
handler.item("pwm_min", _pwm_min_setting);
|
||||
handler.item("pwm_max", _pwm_max_setting);
|
||||
handler.item("pwm_off", _pwm_off_setting, 0.0, 100.0);
|
||||
handler.item("pwm_min", _pwm_min_setting, 0.0, 100.0);
|
||||
handler.item("pwm_max", _pwm_max_setting, 0.0, 100.0);
|
||||
handler.item("invert_pwm", _invert_pwm);
|
||||
handler.item("output_pin", _output_pin);
|
||||
handler.item("enable_pin", _enable_pin);
|
||||
@@ -72,25 +72,25 @@ namespace Spindles {
|
||||
virtual ~PWM() {}
|
||||
|
||||
protected:
|
||||
uint32_t _pwm_off_setting; // do we need these 3?
|
||||
uint32_t _pwm_min_setting;
|
||||
uint32_t _pwm_max_setting;
|
||||
float _pwm_off_setting = 0; // do we need these 3?
|
||||
float _pwm_min_setting = 0;
|
||||
float _pwm_max_setting = 0;
|
||||
|
||||
int32_t _current_pwm_duty;
|
||||
uint32_t _min_rpm;
|
||||
uint32_t _max_rpm;
|
||||
uint32_t _pwm_off;
|
||||
uint32_t _pwm_min;
|
||||
uint32_t _pwm_max;
|
||||
uint32_t _min_rpm = 0;
|
||||
uint32_t _max_rpm = 1000;
|
||||
uint32_t _pwm_off; // calculated at init
|
||||
uint32_t _pwm_min; // calculated at init
|
||||
uint32_t _pwm_max; // calculated at init
|
||||
Pin _output_pin;
|
||||
Pin _enable_pin;
|
||||
Pin _direction_pin;
|
||||
uint8_t _pwm_chan_num;
|
||||
uint32_t _pwm_freq = 5000;
|
||||
uint32_t _pwm_period; // how many counts in 1 period
|
||||
uint8_t _pwm_precision;
|
||||
bool _off_with_zero_speed;
|
||||
bool _invert_pwm;
|
||||
uint32_t _pwm_period; // how many counts in 1 period
|
||||
uint8_t _pwm_precision; // auto calculated
|
||||
bool _off_with_zero_speed = false;
|
||||
bool _invert_pwm = false;
|
||||
|
||||
virtual void set_direction(bool Clockwise);
|
||||
virtual void set_output(uint32_t duty);
|
||||
|
Reference in New Issue
Block a user