From d545ab545f958f99ea45535ad683cb5bca18afaa Mon Sep 17 00:00:00 2001 From: Pierre-A Date: Sun, 2 Nov 2014 14:53:57 +0100 Subject: [PATCH 1/2] Remove profanity from comments (issue #43) --- src/main/io/serial_cli.c | 3 ++- src/main/io/serial_msp.c | 4 +--- src/main/sensors/gyro.c | 2 +- src/main/sensors/initialisation.c | 4 ++-- src/main/telemetry/frsky.c | 2 +- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/main/io/serial_cli.c b/src/main/io/serial_cli.c index b556f96e42..e74d41f2c3 100644 --- a/src/main/io/serial_cli.c +++ b/src/main/io/serial_cli.c @@ -204,6 +204,7 @@ const clivalue_t valueTable[] = { { "min_check", VAR_UINT16 | MASTER_VALUE, &masterConfig.rxConfig.mincheck, PWM_RANGE_ZERO, PWM_RANGE_MAX }, { "max_check", VAR_UINT16 | MASTER_VALUE, &masterConfig.rxConfig.maxcheck, PWM_RANGE_ZERO, PWM_RANGE_MAX }, { "rssi_channel", VAR_INT8 | MASTER_VALUE, &masterConfig.rxConfig.rssi_channel, 0, MAX_SUPPORTED_RC_CHANNEL_COUNT }, + { "rssi_scale", VAR_INT8 | MASTER_VALUE, &masterConfig.rxConfig.rssi_scale, RSSI_SCALE_MIN, RSSI_SCALE_MAX }, { "input_filtering_mode", VAR_INT8 | MASTER_VALUE, &masterConfig.inputFilteringMode, 0, 1 }, { "min_throttle", VAR_UINT16 | MASTER_VALUE, &masterConfig.escAndServoConfig.minthrottle, PWM_RANGE_ZERO, PWM_RANGE_MAX }, @@ -862,7 +863,7 @@ static void cliExit(char *cmdline) *cliBuffer = '\0'; bufferIndex = 0; cliMode = 0; - // incase some idiot leaves a motor running during motortest, clear it here + // incase a motor was left running during motortest, clear it here mixerResetMotors(); // save and reboot... I think this makes the most sense - otherwise config changes can be out of sync, maybe just need to applyConfig and return? #if 1 diff --git a/src/main/io/serial_msp.c b/src/main/io/serial_msp.c index 79f9fd923b..637d5465ec 100755 --- a/src/main/io/serial_msp.c +++ b/src/main/io/serial_msp.c @@ -702,9 +702,7 @@ static bool processOutCommand(uint8_t cmdMSP) serialize16(0); #endif serialize16(sensors(SENSOR_ACC) | sensors(SENSOR_BARO) << 1 | sensors(SENSOR_MAG) << 2 | sensors(SENSOR_GPS) << 3 | sensors(SENSOR_SONAR) << 4); - // OK, so you waste all the fucking time to have BOXNAMES and BOXINDEXES etc, and then you go ahead and serialize enabled shit simply by stuffing all - // the bits in order, instead of setting the enabled bits based on BOXINDEX. WHERE IS THE FUCKING LOGIC IN THIS, FUCKWADS. - // Serialize the boxes in the order we delivered them, until multiwii retards fix their shit + // ?? junk = 0; tmp = IS_ENABLED(FLIGHT_MODE(ANGLE_MODE)) << BOXANGLE | IS_ENABLED(FLIGHT_MODE(HORIZON_MODE)) << BOXHORIZON | diff --git a/src/main/sensors/gyro.c b/src/main/sensors/gyro.c index 748cd26c3e..2ca392eedd 100644 --- a/src/main/sensors/gyro.c +++ b/src/main/sensors/gyro.c @@ -87,7 +87,7 @@ static void performAcclerationCalibration(uint8_t gyroMovementCalibrationThresho if (isOnFinalGyroCalibrationCycle()) { float dev = devStandardDeviation(&var[axis]); - // check deviation and startover if idiot was moving the model + // check deviation and startover in case the model was moved if (gyroMovementCalibrationThreshold && dev > gyroMovementCalibrationThreshold) { gyroSetCalibrationCycles(CALIBRATING_GYRO_CYCLES); return; diff --git a/src/main/sensors/initialisation.c b/src/main/sensors/initialisation.c index abdf0fabde..11bd5d7a86 100755 --- a/src/main/sensors/initialisation.c +++ b/src/main/sensors/initialisation.c @@ -312,10 +312,10 @@ retry: ; // prevent compiler error } - // Found anything? Check if user fucked up or ACC is really missing. + // Found anything? Check if error or ACC is really missing. if (accHardware == ACC_DEFAULT) { if (accHardwareToUse > ACC_DEFAULT) { - // Nothing was found and we have a forced sensor type. Stupid user probably chose a sensor that isn't present. + // Nothing was found and we have a forced sensor that isn't present. accHardwareToUse = ACC_DEFAULT; goto retry; } else { diff --git a/src/main/telemetry/frsky.c b/src/main/telemetry/frsky.c index 5dea46a1a5..8ee797ccb5 100644 --- a/src/main/telemetry/frsky.c +++ b/src/main/telemetry/frsky.c @@ -320,7 +320,7 @@ static void sendVoltage(void) uint16_t payload; /* - * Note: Fuck the pdf. Format for Voltage Data for single cells is like this: + * Format for Voltage Data for single cells is like this: * * llll llll cccc hhhh * l: Low voltage bits From 903392b883765fbbac024591c909dd5c24bf7e7e Mon Sep 17 00:00:00 2001 From: Dominic Clifton Date: Thu, 6 Nov 2014 19:52:10 +0000 Subject: [PATCH 2/2] Updating comment. --- src/main/io/serial_msp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/io/serial_msp.c b/src/main/io/serial_msp.c index 7b06d90f11..510d788467 100755 --- a/src/main/io/serial_msp.c +++ b/src/main/io/serial_msp.c @@ -709,7 +709,9 @@ static bool processOutCommand(uint8_t cmdMSP) serialize16(0); #endif serialize16(sensors(SENSOR_ACC) | sensors(SENSOR_BARO) << 1 | sensors(SENSOR_MAG) << 2 | sensors(SENSOR_GPS) << 3 | sensors(SENSOR_SONAR) << 4); - // ?? + // Serialize the flags in the order we delivered them, ignoring BOXNAMES and BOXINDEXES + // Requires new Multiwii protocol version to fix + // It would be preferable to setting the enabled bits based on BOXINDEX. junk = 0; tmp = IS_ENABLED(FLIGHT_MODE(ANGLE_MODE)) << BOXANGLE | IS_ENABLED(FLIGHT_MODE(HORIZON_MODE)) << BOXHORIZON |