Skip to content

Commit

Permalink
update valve adjust
Browse files Browse the repository at this point in the history
  • Loading branch information
SK21 committed Jan 10, 2024
1 parent a86186e commit 2b426bc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Modules/Teensy Rate/RCteensy/PID.ino
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ int PIDvalve(byte ID)
IntegralSum[ID] *= (Sensor[ID].KI > 0); // zero out if not using KI

DifValue = Sensor[ID].KD * (LastUPM[ID] - Sensor[ID].UPM);
Result = Sensor[ID].KP * SF * RateError + IntegralSum[ID] + DifValue;
Result = Sensor[ID].MinPWM + Sensor[ID].KP * SF * RateError + IntegralSum[ID] + DifValue;

bool IsPositive = (Result > 0);
Result = abs(Result);
Expand Down
4 changes: 2 additions & 2 deletions Modules/Teensy Rate/RCteensy/RCteensy.ino
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
#include <Adafruit_SPIDevice.h>

// rate control with Teensy 4.1
# define InoDescription "RCteensy : 30-Dec-2023"
const uint16_t InoID = 30123; // change to send defaults to eeprom, ddmmy, no leading 0
# define InoDescription "RCteensy : 09-Jan-2024"
const uint16_t InoID = 9014; // change to send defaults to eeprom, ddmmy, no leading 0
const uint8_t InoType = 1; // 0 - Teensy AutoSteer, 1 - Teensy Rate, 2 - Nano Rate, 3 - Nano SwitchBox, 4 - ESP Rate

#define MaxReadBuffer 100 // bytes
Expand Down
2 changes: 1 addition & 1 deletion Modules/Teensy Rate/RCteensy/RCteensy.vcxproj

Large diffs are not rendered by default.

0 comments on commit 2b426bc

Please sign in to comment.