mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-16 21:05:35 +03:00
Implementation of KISS ESC Telemetry protocol
This commit is contained in:
parent
14370426af
commit
16178a0662
20 changed files with 428 additions and 31 deletions
|
@ -231,7 +231,7 @@ static const char * const featureNames[] = {
|
|||
"SONAR", "TELEMETRY", "CURRENT_METER", "3D", "RX_PARALLEL_PWM",
|
||||
"RX_MSP", "RSSI_ADC", "LED_STRIP", "DISPLAY", "OSD",
|
||||
"BLACKBOX", "CHANNEL_FORWARDING", "TRANSPONDER", "AIRMODE",
|
||||
"SDCARD", "VTX", "RX_SPI", "SOFTSPI", NULL
|
||||
"SDCARD", "VTX", "RX_SPI", "SOFTSPI", "ESC_TELEMETRY", NULL
|
||||
};
|
||||
|
||||
// sync this with rxFailsafeChannelMode_e
|
||||
|
@ -513,6 +513,7 @@ static const char * const lookupTableDebug[DEBUG_COUNT] = {
|
|||
"VELOCITY",
|
||||
"DFILTER",
|
||||
"ANGLERATE",
|
||||
"ESC_TELEMETRY",
|
||||
};
|
||||
|
||||
#ifdef OSD
|
||||
|
@ -3600,14 +3601,14 @@ static void cliTasks(char *cmdline)
|
|||
subTaskFrequency = (int)(1000000.0f / ((float)cycleTime));
|
||||
taskFrequency = subTaskFrequency / masterConfig.pid_process_denom;
|
||||
if (masterConfig.pid_process_denom > 1) {
|
||||
cliPrintf("%02d - (%12s) ", taskId, taskInfo.taskName);
|
||||
cliPrintf("%02d - (%13s) ", taskId, taskInfo.taskName);
|
||||
} else {
|
||||
taskFrequency = subTaskFrequency;
|
||||
cliPrintf("%02d - (%8s/%3s) ", taskId, taskInfo.subTaskName, taskInfo.taskName);
|
||||
cliPrintf("%02d - (%9s/%3s) ", taskId, taskInfo.subTaskName, taskInfo.taskName);
|
||||
}
|
||||
} else {
|
||||
taskFrequency = (int)(1000000.0f / ((float)taskInfo.latestDeltaTime));
|
||||
cliPrintf("%02d - (%12s) ", taskId, taskInfo.taskName);
|
||||
cliPrintf("%02d - (%13s) ", taskId, taskInfo.taskName);
|
||||
}
|
||||
const int maxLoad = (taskInfo.maxExecutionTime * taskFrequency + 5000) / 1000;
|
||||
const int averageLoad = (taskInfo.averageExecutionTime * taskFrequency + 5000) / 1000;
|
||||
|
@ -3619,11 +3620,11 @@ static void cliTasks(char *cmdline)
|
|||
taskFrequency, taskInfo.maxExecutionTime, taskInfo.averageExecutionTime,
|
||||
maxLoad/10, maxLoad%10, averageLoad/10, averageLoad%10, taskInfo.totalExecutionTime / 1000);
|
||||
if (taskId == TASK_GYROPID && masterConfig.pid_process_denom > 1) {
|
||||
cliPrintf(" - (%12s) %6d\r\n", taskInfo.subTaskName, subTaskFrequency);
|
||||
cliPrintf(" - (%13s) %6d\r\n", taskInfo.subTaskName, subTaskFrequency);
|
||||
}
|
||||
}
|
||||
}
|
||||
cliPrintf("Total (excluding SERIAL) %22d.%1d%% %4d.%1d%%\r\n", maxLoadSum/10, maxLoadSum%10, averageLoadSum/10, averageLoadSum%10);
|
||||
cliPrintf("Total (excluding SERIAL) %23d.%1d%% %4d.%1d%%\r\n", maxLoadSum/10, maxLoadSum%10, averageLoadSum/10, averageLoadSum%10);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue