Newer
Older
James LeRoy
committed
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
Serial.print(F("XV Lidar Controller Firmware Version "));
Serial.println(xv_config.version);
Serial.print(F("GetSurreal.com"));
Serial.println(F(" "));
Serial.println(F(" "));
Serial.println(F("List of available commands (case sensitive)"));
Serial.println(F(" ShowConfig - Show the running configuration"));
Serial.println(F(" SaveConfig - Save the running configuration to EEPROM"));
Serial.println(F(" ResetConfig - Restore the original configuration"));
Serial.println(F(" SetRPM - Set the desired rotation speed (min: 200, max: 300)"));
Serial.println(F(" SetKp - Set the proportional gain"));
Serial.println(F(" SetKi - Set the integral gain"));
Serial.println(F(" SetKd - Set the derivative gain"));
Serial.println(F(" SetSampleTime - Set the frequency the PID is calculated (ms)"));
Serial.println(F(" ShowRPM - Show the rotation speed"));
Serial.println(F(" HideRPM - Hide the rotation speed"));
Serial.println(F(" ShowDist - Show the distance data"));
Serial.println(F(" HideDist - Hide the distance data"));
Serial.println(F(" ShowAngle - Show distance data for a specific angle (0 - 359 or 360 for all)"));
Serial.println(F(" MotorOff - Stop spinning the lidar"));
Serial.println(F(" MotorOn - Enable spinning of the lidar"));
Serial.println(F(" HideRaw - Stop outputting the raw data from the lidar"));
Serial.println(F(" ShowRaw - Enable the output of the raw lidar data"));
Serial.println(F(" "));
Serial.println(F(" "));
void showConfig() {
if (xv_config.raw_data == true) {
hideRaw();
}
James LeRoy
committed
Serial.println(F(" "));
Serial.println(F(" "));
Serial.print(F("XV Lidar Controller Firmware Version "));
Serial.println(xv_config.version);
Serial.print(F("GetSurreal.com"));
Serial.println(F(" "));
Serial.println(F(" "));
Serial.print(F("PWM pin: "));
Serial.println(xv_config.motor_pwm_pin);
James LeRoy
committed
Serial.print(F("Target RPM: "));
Serial.println(xv_config.rpm_setpoint);
James LeRoy
committed
Serial.print(F("Max PWM: "));
Serial.println(xv_config.pwm_max);
James LeRoy
committed
Serial.print(F("Min PWM: "));
Serial.println(xv_config.pwm_min);
James LeRoy
committed
Serial.print(F("PID Kp: "));
Serial.println(xv_config.Kp);
James LeRoy
committed
Serial.print(F("PID Ki: "));
Serial.println(xv_config.Ki);
James LeRoy
committed
Serial.print(F("PID Kd: "));
Serial.println(xv_config.Kd);
James LeRoy
committed
Serial.print(F("SampleTime: "));
getSurreal
committed
James LeRoy
committed
Serial.print(F("Motor Enable: "));
getSurreal
committed
Serial.println(xv_config.motor_enable);
James LeRoy
committed
Serial.print(F("Show Raw Data: "));
Serial.println(xv_config.raw_data);
James LeRoy
committed
Serial.print(F("Show Dist Data: "));
Serial.println(xv_config.show_dist);
Serial.print(F("Show RPM Data: "));
Serial.println(xv_config.show_rpm);
Serial.print(F("Show Angle: "));
Serial.println(xv_config.show_angle);
Serial.println(F(" "));
Serial.println(F(" "));
void saveConfig() {
EEPROM_writeAnything(0, xv_config);
James LeRoy
committed
Serial.print(F("Config Saved."));
James LeRoy
committed