Skip to content

Commit

Permalink
Merge branch 'release/1.0a2-Azurit'
Browse files Browse the repository at this point in the history
  • Loading branch information
autega committed May 10, 2015
2 parents 2190feb + 54e8d13 commit 05b02fe
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion ardumower/mower.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ Mower::Mower(){
// ------ mower motor -------------------------------
motorMowAccel = 0.1; // motor mower acceleration (warning: do not set too high)
motorMowSpeedMaxPwm = 255; // motor mower max PWM
motorMowPowerMax = 50.0; // motor mower max power (Watt)
motorMowPowerMax = 75.0; // motor mower max power (Watt)
motorMowModulate = 0; // motor mower cutter modulation?
motorMowRPMSet = 3300; // motor mower RPM (only for cutter modulation)
motorMowSenseScale = 15.3; // motor mower sense scale (mA=(ADC-zero)/scale)
Expand Down
4 changes: 2 additions & 2 deletions ardumower/perimeter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@


Perimeter::Perimeter(){
useDifferentialPerimeterSignal = false;
useDifferentialPerimeterSignal = true;
swapCoilPolarity = false;
timedOutIfBelowSmag = 300;
timeOutSecIfNotInside = 8;
Expand Down Expand Up @@ -248,4 +248,4 @@ int16_t Perimeter::corrFilter(int8_t *H, int8_t subsample, int16_t M, int8_t *ip





15 changes: 9 additions & 6 deletions ardumower/robot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1398,8 +1398,11 @@ void Robot::readSensors(){
}
}
if (perimeter.signalTimedOut(0)) {
if ( (stateCurr != STATE_OFF) && (stateCurr != STATE_MANUAL) && (stateCurr != STATE_STATION) && (stateCurr != STATE_STATION_CHARGING) && (stateCurr != STATE_REMOTE)) {
Console.println(F("Error: perimeter too far away"));
if ( (stateCurr != STATE_OFF) && (stateCurr != STATE_MANUAL) && (stateCurr != STATE_STATION)
&& (stateCurr != STATE_STATION_CHARGING) && (stateCurr != STATE_STATION_CHECK)
&& (stateCurr != STATE_STATION_REV) && (stateCurr != STATE_STATION_ROLL)
&& (stateCurr != STATE_STATION_FORW) && (stateCurr != STATE_REMOTE)) {
Console.println("Error: perimeter too far away");
addErrorCounter(ERR_PERIMETER_TIMEOUT);
setNextState(STATE_ERROR,0);
}
Expand Down Expand Up @@ -1584,18 +1587,18 @@ void Robot::setNextState(byte stateNew, byte dir){
rollDir = dir;
if (stateNew == STATE_STATION_REV){
motorLeftSpeedRpmSet = motorRightSpeedRpmSet = -motorSpeedMaxRpm;
stateEndTime = millis() + stationRevTime;
stateEndTime = millis() + stationRevTime + motorZeroSettleTime;
} else if (stateNew == STATE_STATION_ROLL){
motorLeftSpeedRpmSet = motorSpeedMaxRpm;
motorRightSpeedRpmSet = -motorLeftSpeedRpmSet;
stateEndTime = millis() + stationRollTime;
stateEndTime = millis() + stationRollTime + motorZeroSettleTime;
} else if (stateNew == STATE_STATION_FORW){
motorLeftSpeedRpmSet = motorRightSpeedRpmSet = motorSpeedMaxRpm;
motorMowEnable = true;
stateEndTime = millis() + stationForwTime;
stateEndTime = millis() + stationForwTime + motorZeroSettleTime;
} else if (stateNew == STATE_STATION_CHECK){
motorLeftSpeedRpmSet = motorRightSpeedRpmSet = -motorSpeedMaxRpm/2;
stateEndTime = millis() + stationCheckTime;
stateEndTime = millis() + stationCheckTime + motorZeroSettleTime;

} else if (stateNew == STATE_PERI_ROLL) {
stateEndTime = millis() + perimeterTrackRollTime;
Expand Down

0 comments on commit 05b02fe

Please sign in to comment.