[PVS] Code improvements and corrections

This commit is contained in:
Ton Huisman
2022-11-25 22:17:38 +01:00
parent ceca727793
commit b6a403183d
3 changed files with 7 additions and 7 deletions
+3 -3
View File
@@ -72,9 +72,9 @@ typedef struct {
};
/* Orientation sensors */
struct {
float roll; /**< Rotation around the longitudinal axis (the plane body, 'X axis'). Roll is positive and increasing when moving downward. -90<=roll<=90 */
float pitch; /**< Rotation around the lateral axis (the wing span, 'Y axis'). Pitch is positive and increasing when moving upwards. -180<=pitch<=180) */
float heading; /**< Angle between the longitudinal axis (the plane body) and magnetic north, measured clockwise when viewing from the top of the device. 0-359 */
float roll; /**< Rotation around the longitudinal axis (the plane body, 'X axis'). Roll is positive and increasing when moving downward. -90 deg.<=roll<=90 deg/ */
float pitch; /**< Rotation around the lateral axis (the wing span, 'Y axis'). Pitch is positive and increasing when moving upwards. -180 deg.<=pitch<=180 deg.) */
float heading; /**< Angle between the longitudinal axis (the plane body) and magnetic north, measured clockwise when viewing from the top of the device. 0-359 deg. */
};
};
int8_t status;
+1 -1
View File
@@ -296,7 +296,7 @@ boolean Plugin_129(uint8_t function, struct EventStruct *event, String& string)
}
for (uint8_t j = 0; j < 8; j++) {
bitWrite(bits, static_cast<uint64_t>(off * 8 + (7 - j)), isFormItemChecked(getPluginCustomArgName((i * 8 + (7 - j)) + 1)));
bitWrite(bits, static_cast<uint64_t>(off * 8 + (7 - j)), isFormItemChecked(getPluginCustomArgName((i * 8 + (7 - j)) + 1))); // -V784
}
PCONFIG_ULONG(i / 4) = bits;
+3 -3
View File
@@ -2871,7 +2871,7 @@ bool AdafruitGFX_helper::showBmp(const String& filename,
g = file.read();
r = file.read();
(void)file.read(); // Ignore 4th byte
quantized[c] = // -V757
quantized[c] = // -V522
((r & 0xF8) << 8) | ((g & 0xFC) << 3) | (b >> 3);
}
}
@@ -2947,8 +2947,8 @@ bool AdafruitGFX_helper::showBmp(const String& filename,
if (depth == 24) {
// Convert each pixel from BMP to 565 format, save in dest
b = sdbuf[srcidx++];
g = sdbuf[srcidx++]; // -V3106
r = sdbuf[srcidx++]; // -V3106
g = sdbuf[srcidx++]; // -V557
r = sdbuf[srcidx++]; // -V557
dest[destidx++] =
((r & 0xF8) << 8) | ((g & 0xFC) << 3) | (b >> 3);
} else {