Skip to content

Commit

Permalink
🐛 Sweep bugfix, better ramp limit default, +utils version get
Browse files Browse the repository at this point in the history
  • Loading branch information
t413 committed Feb 12, 2021
1 parent e6e5ba1 commit f215753
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/MPPTLib/solar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ void Solar::doSweepStep() {

updatePSU();

bool isCollapsed = psu_->isCollapsed();
bool isCollapsed = hasCollapsed();
sweepPoints_.push_back({v: psu_->outVolt_, i: psu_->outCurr_, input: inVolt_, collapsed: isCollapsed});
int collapsedPoints = 0, nonCollapsedPoints = 0;
for (int i = 0; i < sweepPoints_.size(); i++) {
Expand Down
2 changes: 1 addition & 1 deletion lib/MPPTLib/solar.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class Solar {
String state_;
int pinInvolt_ = 32;
float inVolt_ = 0;
double setpoint_ = 0, pgain_ = 0.005, ramplimit_ = 2;
double setpoint_ = 0, pgain_ = 0.005, ramplimit_ = 12;
double currentCap_ = 8.5;
CircularArray<uint32_t, 32> collapses_;
int measperiod_ = 200, printPeriod_ = 1000, adjustPeriod_ = 2000;
Expand Down
3 changes: 3 additions & 0 deletions utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ def getVersion():
if len(sys.argv) > 1 and sys.argv[1] == "version":
print("-DGIT_VERSION=\\\"%s\\\"" % getVersion())

elif len(sys.argv) > 1 and sys.argv[1] == "simple":
print(getVersion())

elif len(sys.argv) > 1 and sys.argv[0].endswith("scons"): #pre/post extra_script
Import("env")
# print(Back.GREEN + Fore.BLACK + "sys argv" + Style.RESET_ALL + str(sys.argv))
Expand Down

0 comments on commit f215753

Please sign in to comment.