-
Notifications
You must be signed in to change notification settings - Fork 11
Added support for grab sampler from comeadhra repository. #27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks pretty good aside from just needing some formatting changes.
Can we clean it up just a bit before merging? Should only be a few minutes of work in a text editor.
if (strncmp(param, "temp", 4) == 0){ | ||
this->setTemp(atof(value)); | ||
return true; | ||
if (strncmp(param, "t", 1) == 0){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Newline this brace.
if (value == NULL) | ||
{ | ||
char output_str[DEFAULT_BUFFER_SIZE + 3]; | ||
snprintf(output_str, DEFAULT_BUFFER_SIZE, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix indent on this block.
calibrationStatus | ||
); | ||
send(output_str); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove whitespace, fix indent (this might be a spaces/tabs mix-- if so, convert everything to spaces).
this->calibrate(1); | ||
return true; | ||
} | ||
//Serial.println("trigger calibrate method"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this unless we regularly use it for testing.
return true; | ||
} | ||
|
||
//Serial.println("trigger calibrate method"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove commented print unless regularly used for debugging.
void AtlasDO::setTemp(double temp) { | ||
if (temp > 0.0){ | ||
this->temperature = temp; | ||
this->temperature = min(temp, 100.0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the reason to clamp this? Is there some out-of-range issue we are worried about? Seems bad to not know we are out of range.
|
||
} | ||
|
||
/*void GrabSampler::loop() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove commented code block unless we plan to use it.
|
||
switch(pump_num) | ||
{ | ||
case 0: case 1: digitalWrite(board::SENSOR[channel_].GPIO[board::RX_POS], HIGH); analogWrite(board::SENSOR[channel_].GPIO[board::RX_NEG], pump_num == 0 ? 255 : 0); break; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix indenting/newlines here to look like a normal switch case.
{ | ||
// init_time = millis(); | ||
|
||
pinMode(board::SENSOR[channel_].GPIO[board::RX_POS], OUTPUT); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More indent fixes.
Needs testing but should be ok to merge into Master.