mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-21 15:25:36 +03:00
Fixing code style on some HoTT code.
This commit is contained in:
parent
ce3b7859da
commit
24d162dc3e
1 changed files with 14 additions and 8 deletions
|
@ -137,7 +137,8 @@ void hottV4GPSUpdate(void)
|
||||||
* Writes cell 1-4 high, low values and if not available
|
* Writes cell 1-4 high, low values and if not available
|
||||||
* calculates vbat.
|
* calculates vbat.
|
||||||
*/
|
*/
|
||||||
static void hottV4EAMUpdateBattery() {
|
static void hottV4EAMUpdateBattery()
|
||||||
|
{
|
||||||
#if 0
|
#if 0
|
||||||
HoTTV4ElectricAirModule.cell1L = 4.2f * 10 * 5; // 2mv step
|
HoTTV4ElectricAirModule.cell1L = 4.2f * 10 * 5; // 2mv step
|
||||||
HoTTV4ElectricAirModule.cell1H = 0;
|
HoTTV4ElectricAirModule.cell1H = 0;
|
||||||
|
@ -168,7 +169,8 @@ static void hottV4EAMUpdateBattery() {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static void hottV4EAMUpdateTemperatures() {
|
static void hottV4EAMUpdateTemperatures()
|
||||||
|
{
|
||||||
HoTTV4ElectricAirModule.temp1 = 20 + 0;
|
HoTTV4ElectricAirModule.temp1 = 20 + 0;
|
||||||
HoTTV4ElectricAirModule.temp2 = 20;
|
HoTTV4ElectricAirModule.temp2 = 20;
|
||||||
|
|
||||||
|
@ -184,7 +186,8 @@ static void hottV4EAMUpdateTemperatures() {
|
||||||
/**
|
/**
|
||||||
* Sends HoTTv4 capable EAM telemetry frame.
|
* Sends HoTTv4 capable EAM telemetry frame.
|
||||||
*/
|
*/
|
||||||
void hottV4FormatAndSendEAMResponse(void) {
|
void hottV4FormatAndSendEAMResponse(void)
|
||||||
|
{
|
||||||
memset(&HoTTV4ElectricAirModule, 0, sizeof(HoTTV4ElectricAirModule));
|
memset(&HoTTV4ElectricAirModule, 0, sizeof(HoTTV4ElectricAirModule));
|
||||||
|
|
||||||
/** Minimum data set for EAM */
|
/** Minimum data set for EAM */
|
||||||
|
@ -210,7 +213,8 @@ void hottV4FormatAndSendEAMResponse(void) {
|
||||||
hottV4Respond((uint8_t*)&HoTTV4ElectricAirModule, sizeof(HoTTV4ElectricAirModule));
|
hottV4Respond((uint8_t*)&HoTTV4ElectricAirModule, sizeof(HoTTV4ElectricAirModule));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void hottV4Respond(uint8_t *data, uint8_t size) {
|
static void hottV4Respond(uint8_t *data, uint8_t size)
|
||||||
|
{
|
||||||
|
|
||||||
serialSetMode(core.telemport, MODE_TX);
|
serialSetMode(core.telemport, MODE_TX);
|
||||||
|
|
||||||
|
@ -233,16 +237,19 @@ static void hottV4Respond(uint8_t *data, uint8_t size) {
|
||||||
serialSetMode(core.telemport, MODE_RX);
|
serialSetMode(core.telemport, MODE_RX);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void hottV4SerialWrite(uint8_t c) {
|
static void hottV4SerialWrite(uint8_t c)
|
||||||
|
{
|
||||||
serialWrite(core.telemport, c);
|
serialWrite(core.telemport, c);
|
||||||
}
|
}
|
||||||
|
|
||||||
void configureHoTTTelemetryPort(void) {
|
void configureHoTTTelemetryPort(void)
|
||||||
|
{
|
||||||
// TODO set speed here to 19200?
|
// TODO set speed here to 19200?
|
||||||
serialSetMode(core.telemport, MODE_RX);
|
serialSetMode(core.telemport, MODE_RX);
|
||||||
}
|
}
|
||||||
|
|
||||||
void freeHoTTTelemetryPort(void) {
|
void freeHoTTTelemetryPort(void)
|
||||||
|
{
|
||||||
serialSetMode(core.telemport, MODE_RXTX);
|
serialSetMode(core.telemport, MODE_RXTX);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -268,4 +275,3 @@ void handleHoTTTelemetry(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue