Skip to content

Commit

Permalink
Merge pull request #262 from pioneers/temp
Browse files Browse the repository at this point in the history
[LOWCAR] Small fixes to KoalaBear
  • Loading branch information
jisungk2 authored Apr 26, 2023
2 parents 88b5042 + a894865 commit d956812
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
10 changes: 5 additions & 5 deletions lowcar/devices/KoalaBear/KoalaBear.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ KoalaBear::KoalaBear() : Device(DeviceType::KOALA_BEAR, 13) {
// initialize PID controllers
this->pid_a = new PID();
this->pid_b = new PID();
this->pid_enabled_a = this->pid_enabled_b = TRUE; // by default, PID control is enabled
this->pid_enabled_a = this->pid_enabled_b = FALSE; // by default, PID control is enabled
this->pid_a->set_coefficients(KP_DEFAULT, KI_DEFAULT, KD_DEFAULT);
this->pid_b->set_coefficients(KP_DEFAULT, KI_DEFAULT, KD_DEFAULT);

Expand Down Expand Up @@ -269,8 +269,8 @@ void KoalaBear::device_enable() {
pinMode(BENC1, INPUT);
pinMode(BENC2, INPUT);

this->pid_enabled_a = TRUE;
this->pid_enabled_b = TRUE;
this->pid_enabled_a = FALSE;
this->pid_enabled_b = FALSE;

this->led->setup_LEDs();

Expand All @@ -288,8 +288,8 @@ void KoalaBear::device_reset() {
this->velocity_b = 0.0;
this->curr_velocity_a = 0.0;
this->curr_velocity_b = 0.0;
this->pid_enabled_a = TRUE;
this->pid_enabled_b = TRUE;
this->pid_enabled_a = FALSE;
this->pid_enabled_b = FALSE;
this->online = FALSE;
}

Expand Down
1 change: 0 additions & 1 deletion lowcar/devices/PDB/PDB.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ class PDB : public Device {

// overriden functions from Device class; see descriptions in Device.h
virtual size_t device_read(uint8_t param, uint8_t* data_buf);
virtual void device_enable();
virtual void device_actions();
void expanderWrite(byte data);
void writeString(char* str);
Expand Down

0 comments on commit d956812

Please sign in to comment.