Skip to content

Commit 08c649d

Browse files
committed
no longer startup motor in setup
fixed typo added save reply
1 parent e454004 commit 08c649d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

XV_Lidar_Controller.ino

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ void setup() {
6060
Serial1.begin(115200); // XV LDS data
6161

6262
Timer3.initialize(30); // set PWM frequency to 32.768kHz
63-
Timer3.pwm(xv_config.motor_pwm_pin, xv_config.pwm_min); // replacement for analogWrite()
6463

6564
rpmPID.SetOutputLimits(xv_config.pwm_min,xv_config.pwm_max);
6665
rpmPID.SetSampleTime(20);
@@ -86,7 +85,7 @@ void loop() {
8685
if (xv_config.motor_enable) {
8786
rpmPID.Compute();
8887
if (pwm_val != pwm_last) {
89-
Timer3.pwm(xv_config.motor_pwm_pin, pwm_val);
88+
Timer3.pwm(xv_config.motor_pwm_pin, pwm_val); // replacement for analogWrite()
9089
pwm_last = pwm_val;
9190
}
9291
}
@@ -399,12 +398,13 @@ void getConfig() {
399398

400399
Serial.print("Motor Enable: ");
401400
Serial.println(xv_config.motor_enable);
402-
Serial.print("Realy: ");
401+
Serial.print("Relay: ");
403402
Serial.println(xv_config.relay);
404403
}
405404

406405
void saveConfig() {
407406
EEPROM_writeAnything(0, xv_config);
407+
Serial.println("Config Saved.");
408408
}
409409

410410

0 commit comments

Comments
 (0)