mirror of
https://github.com/letscontrolit/ESPEasy.git
synced 2026-07-28 04:07:47 +00:00
[PVS] Code improvements and corrections
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user