Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #174 from mikeller/add_open_esc_support
- Loading branch information
Showing
19 changed files
with
441 additions
and
312 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
'use strict'; | ||
|
||
var OPEN_ESC_DEFAULTS = { | ||
'0': { | ||
MOTOR_DIRECTION: 0, | ||
BIDIRECTIONAL_MODE: 0, | ||
SINUSOIDAL_STARTUP: 0, | ||
COMPLEMENTARY_PWM: 1, | ||
VARIABLE_PWM_FREQUENCY: 1, | ||
STUCK_ROTOR_PROTECTION: 1, | ||
TIMING_ADVANCE: 2, | ||
PWM_FREQUENCY: 24, | ||
STARTUP_POWER: 100, | ||
MOTOR_KV: 55, | ||
MOTOR_POLES: 14, | ||
BRAKE_ON_STOP: 1, | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
'use strict'; | ||
|
||
const OPEN_ESC_TYPES = { | ||
ARM: 'Arm' | ||
}; | ||
|
||
const OPEN_ESC_PAGE_SIZE = 0x0400 | ||
const OPEN_ESC_EEPROM_OFFSET = 0x7c00 | ||
const OPEN_ESC_LAYOUT_SIZE = 0x30 | ||
|
||
const OPEN_ESC_LAYOUT = { | ||
BOOT_BYTE: { offset: 0x00, size: 1 }, | ||
LAYOUT_REVISION: { offset: 0x01, size: 1 }, | ||
BOOT_LOADER_REVISION: { offset: 0x02, size: 1 }, | ||
MAIN_REVISION: { offset: 0x03, size: 1 }, | ||
SUB_REVISION: { offset: 0x04, size: 1 }, | ||
|
||
NAME: { offset: 0x05, size: 12 }, | ||
|
||
MOTOR_DIRECTION: { offset: 0x11, size: 1 }, | ||
BIDIRECTIONAL_MODE: { offset: 0x12, size: 1 }, | ||
SINUSOIDAL_STARTUP: { offset: 0x13, size: 1 }, | ||
COMPLEMENTARY_PWM: { offset: 0x14, size: 1 }, | ||
VARIABLE_PWM_FREQUENCY: { offset: 0x15, size: 1 }, | ||
STUCK_ROTOR_PROTECTION: { offset: 0x16, size: 1 }, | ||
TIMING_ADVANCE: { offset: 0x17, size: 1 }, | ||
STARTUP_POWER: { offset: 0x18, size: 1 }, | ||
PWM_FREQUENCY: { offset: 0x19, size: 1 }, | ||
MOTOR_KV: { offset: 0x1a, size: 1 }, | ||
MOTOR_POLES: { offset: 0x1b, size: 1 }, | ||
BRAKE_ON_STOP: { offset: 0x1c, size: 1 }, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
var OPEN_ESC_ESCS_REMOTE = 'https://raw.githubusercontent.com/blheli-configurator/blheli-configurator/master/js/open_esc_escs.json'; | ||
var OPEN_ESC_ESCS_LOCAL = './js/open_esc_escs.json'; | ||
var OPEN_ESC_ESCS_KEY = 'open_esc_escs'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"layouts": { | ||
"Arm": { | ||
"FD6288": { "name": "FD6288 based", "fileName": "FD6288" }, | ||
"HGLRC60A": { "name": "HGLRC 60A", "fileName": "HGLRC60A" }, | ||
"IFLIGHT": { "name": "iFlight 50A", "fileName": "IFLIGHT" }, | ||
"MP6531": { "name": "MP6531 based", "fileName": "MP6531" }, | ||
"SISKIN": { "name": "Sunrise Siskin", "fileName": "SISKIN" }, | ||
"TMOTOR45A": { "name": "T-motor 45A", "fileName": "TMOTOR45A" }, | ||
"TMOTOR55A": { "name": "T-motor 55A", "fileName": "TMOTOR55A" } | ||
} | ||
}, | ||
"signatures": { | ||
"Arm": [ | ||
{ "name": "STM32F051", "signature": "0x1f06", "page_size": 1024, "flash_size": 65536, "flash_offset": "0x08000000", "firmware_start": "0x1000" } | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
'use strict'; | ||
|
||
var OPEN_ESC_SETTINGS_LAYOUT_0 = [ | ||
{ | ||
name: 'SINUSOIDAL_STARTUP', type: 'bool', label: 'escSinusoidalStartup' | ||
}, | ||
{ | ||
name: 'COMPLEMENTARY_PWM', type: 'bool', label: 'escComplementaryPwm' | ||
}, | ||
{ | ||
name: 'VARIABLE_PWM_FREQUENCY', type: 'bool', label: 'escVariablePwmFrequency' | ||
}, | ||
{ | ||
name: 'STUCK_ROTOR_PROTECTION', type: 'bool', label: 'escStuckRotorProtection' | ||
}, | ||
{ | ||
name: 'TIMING_ADVANCE', type: 'number', min: 0, max: 22.5, step: 7.5, label: 'escTimingAdvance', displayFactor: 7.5 | ||
}, | ||
{ | ||
name: 'MOTOR_KV', type: 'number', min: 20, max: 10220, step: 40, label: 'escMotorKv', displayFactor: 40, displayOffset: 20 | ||
}, | ||
{ | ||
name: 'MOTOR_POLES', type: 'number', min: 2, max: 36, step: 1, label: 'escMotorPoles' | ||
}, | ||
{ | ||
name: 'STARTUP_POWER', type: 'number', min: 50, max: 150, step: 1, label: 'escStartupPower' | ||
}, | ||
{ | ||
name: 'PWM_FREQUENCY', type: 'number', min: 24, max: 48, step: 1, label: 'escPwmFrequency' | ||
}, | ||
{ | ||
name: 'BRAKE_ON_STOP', type: 'bool', label: 'escBrakeOnStop' | ||
}, | ||
]; | ||
|
||
var OPEN_ESC_SETTINGS_DESCRIPTIONS = { | ||
'0': { | ||
base: OPEN_ESC_SETTINGS_LAYOUT_0 | ||
}, | ||
}; | ||
|
||
// @todo add validation for min/max throttle | ||
var OPEN_ESC_INDIVIDUAL_SETTINGS = [ | ||
{ | ||
name: 'MOTOR_DIRECTION', type: 'bool', label: 'escDirectionReversed' | ||
}, | ||
{ | ||
name: 'BIDIRECTIONAL_MODE', type: 'bool', label: 'escBidirectionalMode' | ||
}, | ||
]; | ||
|
||
var OPEN_ESC_INDIVIDUAL_SETTINGS_DESCRIPTIONS = { | ||
'0': { | ||
base: OPEN_ESC_INDIVIDUAL_SETTINGS | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
var OPEN_ESC_VERSIONS_REMOTE = 'https://raw.githubusercontent.com/blheli-configurator/blheli-configurator/master/js/open_esc_versions.json'; | ||
var OPEN_ESC_VERSIONS_LOCAL = './js/open_esc_versions.json'; | ||
var OPEN_ESC_VERSIONS_KEY = 'open_esc_versions'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"Arm": [ | ||
{ | ||
"name": "1.58", | ||
"url": "https://raw.githubusercontent.com/AlkaMotors/AM32-MultiRotor-ESC-firmware/master/Release/1_58/{0}_1_58.hex", | ||
"key": "1.58" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.