mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-23 08:15:22 +03:00
Merge pull request #2416 from chmelevskij/chore/utils-modules
chore: move css and CommonUtils to modules
This commit is contained in:
commit
d123e08180
6 changed files with 17 additions and 19 deletions
|
@ -74,10 +74,20 @@ export function generateVirtualApiVersions() {
|
|||
firmwareVersionDropdown.appendChild(option);
|
||||
}
|
||||
}
|
||||
export function getMixerImageSrc(mixerIndex, reverseMotorDir, apiVersion)
|
||||
{
|
||||
let reverse = "";
|
||||
|
||||
if (semver.gte(apiVersion, API_VERSION_1_36)) {
|
||||
reverse = reverseMotorDir ? "_reversed" : "";
|
||||
}
|
||||
|
||||
return `./resources/motor_order/${mixerList[mixerIndex - 1].image}${reverse}.svg`;
|
||||
}
|
||||
|
||||
// TODO: these are temp binding while transition to module happens
|
||||
window.degToRad = degToRad;
|
||||
window.bytesToSize = bytesToSize;
|
||||
window.checkChromeRuntimeError = checkChromeRuntimeError;
|
||||
window.generateVirtualApiVersions = generateVirtualApiVersions;
|
||||
window.millitime = millitime;
|
||||
window.getMixerImageSrc = getMixerImageSrc;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue