Skip to content
Snippets Groups Projects
Commit 7b79c157 authored by Werner Sembach's avatar Werner Sembach
Browse files

Cleanup

parent 056604a9
Branches
No related tags found
No related merge requests found
...@@ -148,31 +148,12 @@ extern "C" bool simulate_spring(struct spring springs[], int len) { ...@@ -148,31 +148,12 @@ extern "C" bool simulate_spring(struct spring springs[], int len) {
dc_set(0,0); dc_set(0,0);
} }
} }
return springs[i].solved; return springs[i].solved;
} }
} }
// in case no threshold is "reached" (e.g. the struct params are faulty) // in case no threshold is "reached" (e.g. the struct params are faulty)
// the box shouldn't be unopenable then // the box shouldn't be unopenable then
return true; return true;
/*old stuff without params:
if (adc_value < 256) {
//potty protection deadzone
dc_set(0, 0);
}
else if(adc_value > (4096 - 256)) {
//spring is "broken"
dc_set(0, 0);
return true;
}
else {
//main simulation
dc_set(DC_RIGHT, adc_value / 4096.0 * 255);
}
return false;
*/
} }
// turns the motor real fast if above certain position // turns the motor real fast if above certain position
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment