mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-17 05:15:20 +03:00
Merge remote-tracking branch 'origin/baseflight-configurator-development' into GUI-rework
Conflicts: README.md js/libraries/d3.min.js js/msp.js main.html
This commit is contained in:
commit
3a9c7f3794
8 changed files with 89 additions and 8 deletions
38
README.md
38
README.md
|
@ -1,3 +1,4 @@
|
|||
<<<<<<< HEAD
|
||||
# Cleanflight Configurator
|
||||
|
||||
Cleanflight Configurator is a crossplatform configuration tool for the [Cleanflight](http://cleanflight.com/) flight control system.
|
||||
|
@ -41,6 +42,43 @@ You can find the Cleanflight Configurator icon in your application tab "Apps"
|
|||
|
||||
### WebGL
|
||||
|
||||
=======
|
||||
*NOTICE*
|
||||
========
|
||||
|
||||
This code is dead, cTn made the original closed source. All new development should happen on the cleanflight/development branch.
|
||||
|
||||
https://github.com/cleanflight/cleanflight-configurator/tree/development
|
||||
|
||||
This copy of the old baseflight code is placed in the cleanflight repository as a courtesy to the Open Source community.
|
||||
|
||||
Baseflight Configurator
|
||||
=======================
|
||||
Configurator based on chrome.serial API running on Google Chrome/Chromium core
|
||||
|
||||
Keep in mind that this configurator is the most up-to-date configurator implementation for Baseflight flight software,
|
||||
in many cases it requires latest firmware on the flight controller, if you are experiencing any problems,
|
||||
please make sure you are running the latest version of firmware.
|
||||
|
||||
Installation
|
||||
------------
|
||||
1. - Visit [Chrome web store](https://chrome.google.com/webstore/detail/baseflight-multiwii-confi/mppkgnedeapfejgfimkdoninnofofigk)
|
||||
2. - Click <strong>+ Free</strong>
|
||||
|
||||
Alternative way
|
||||
---------------
|
||||
1. - Clone the repo to any local directory or download it as zip
|
||||
2. - Start chromium or google chrome and go to tools -> extension
|
||||
3. - Check the "Developer mode" checkbox
|
||||
4. - Click on load unpacked extension and point it to the baseflight configurator directory (for example D:/baseflight-configurator)
|
||||
|
||||
How to use
|
||||
-----------
|
||||
You can find the Baseflight - Configurator icon in your application tab "Apps"
|
||||
|
||||
WebGL
|
||||
-----
|
||||
>>>>>>> origin/baseflight-configurator-development
|
||||
Make sure Settings -> System -> "User hardware acceleration when available" is checked to achieve the best performance
|
||||
|
||||
### Linux users
|
||||
|
|
|
@ -478,6 +478,9 @@
|
|||
"configurationBatteryMinimum": {
|
||||
"message": "Minimum Cell Voltage"
|
||||
},
|
||||
"configurationBatteryWarning": {
|
||||
"message": "Warning Cell Voltage"
|
||||
},
|
||||
"configurationBatteryMaximum": {
|
||||
"message": "Maximum Cell Voltage"
|
||||
},
|
||||
|
|
8
js/libraries/d3.min.js
vendored
8
js/libraries/d3.min.js
vendored
File diff suppressed because one or more lines are too long
19
js/msp.js
19
js/msp.js
|
@ -377,6 +377,7 @@ var MSP = {
|
|||
}
|
||||
break;
|
||||
case MSP_codes.MSP_MISC: // 22 bytes
|
||||
<<<<<<< HEAD
|
||||
var offset = 0;
|
||||
MISC.midrc = data.getInt16(offset, 1);
|
||||
offset += 2;
|
||||
|
@ -400,6 +401,24 @@ var MSP = {
|
|||
MISC.vbatmincellvoltage = data.getUint8(offset++, 1) / 10; // 10-50
|
||||
MISC.vbatmaxcellvoltage = data.getUint8(offset++, 1) / 10; // 10-50
|
||||
MISC.vbatwarningcellvoltage = data.getUint8(offset++, 1) / 10; // 10-50
|
||||
=======
|
||||
MISC.midrc = data.getInt16(0, 1);
|
||||
MISC.minthrottle = data.getUint16(2, 1); // 0-2000
|
||||
MISC.maxthrottle = data.getUint16(4, 1); // 0-2000
|
||||
MISC.mincommand = data.getUint16(6, 1); // 0-2000
|
||||
MISC.failsafe_throttle = data.getUint16(8, 1); // 1000-2000
|
||||
MISC.gps_type = data.getUint8(10);
|
||||
MISC.gps_baudrate = data.getUint8(11);
|
||||
MISC.gps_ubx_sbas = data.getInt8(12);
|
||||
MISC.multiwiicurrentoutput = data.getUint8(13);
|
||||
MISC.rssi_aux_channel = data.getUint8(14);
|
||||
MISC.placeholder2 = data.getUint8(15);
|
||||
MISC.mag_declination = data.getInt16(16, 1) / 10; // -18000-18000
|
||||
MISC.vbatscale = data.getUint8(18, 1); // 10-200
|
||||
MISC.vbatmincellvoltage = data.getUint8(19, 1) / 10; // 10-50
|
||||
MISC.vbatmaxcellvoltage = data.getUint8(20, 1) / 10; // 10-50
|
||||
MISC.vbatwarningcellvoltage = data.getUint8(21, 1) / 10; // 10-50
|
||||
>>>>>>> origin/baseflight-configurator-development
|
||||
break;
|
||||
case MSP_codes.MSP_MOTOR_PINS:
|
||||
console.log(data);
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
Official "specs" are from 115200 to 1200
|
||||
|
||||
popular choices - 921600, 460800, 256000, 230400, 153600, 128000, 115200, 57600, 38400, 28800, 19200
|
||||
|
||||
Documentation reference: http://www.st.com/web/en/resource/technical/document/application_note/CD00264342.pdf
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
|
@ -384,7 +386,7 @@ STM32_protocol.prototype.upload_procedure = function (step) {
|
|||
break;
|
||||
case 2:
|
||||
// get version of the bootloader and supported commands
|
||||
self.send([self.command.get, 0xFF], 2, function (data) { // 0x00 ^ 0xFF
|
||||
self.send([self.command.get, self.command.get ^ 0xFF], 2, function (data) {
|
||||
if (self.verify_response(self.status.ACK, data)) {
|
||||
self.retrieve(data[1] + 1 + 1, function (data) { // data[1] = number of bytes that will follow [– 1 except current and ACKs]
|
||||
console.log('STM32 - Bootloader version: ' + (parseInt(data[0].toString(16)) / 10).toFixed(1)); // convert dec to hex, hex to dec and add floating point
|
||||
|
@ -399,7 +401,7 @@ STM32_protocol.prototype.upload_procedure = function (step) {
|
|||
break;
|
||||
case 3:
|
||||
// get ID (device signature)
|
||||
self.send([self.command.get_ID, 0xFD], 2, function (data) { // 0x01 ^ 0xFF
|
||||
self.send([self.command.get_ID, self.command.get_ID ^ 0xFF], 2, function (data) {
|
||||
if (self.verify_response(self.status.ACK, data)) {
|
||||
self.retrieve(data[1] + 1 + 1, function (data) { // data[1] = number of bytes that will follow [– 1 (N = 1 for STM32), except for current byte and ACKs]
|
||||
var signature = (data[0] << 8) | data[1];
|
||||
|
@ -494,7 +496,7 @@ STM32_protocol.prototype.upload_procedure = function (step) {
|
|||
console.log(message);
|
||||
$('span.progressLabel').text(message + ' ...');
|
||||
|
||||
self.send([self.command.erase, 0xBC], 1, function (reply) { // 0x43 ^ 0xFF
|
||||
self.send([self.command.erase, self.command.erase ^ 0xFF], 1, function (reply) {
|
||||
if (self.verify_response(self.status.ACK, reply)) {
|
||||
self.send([0xFF, 0x00], 1, function (reply) {
|
||||
if (self.verify_response(self.status.ACK, reply)) {
|
||||
|
@ -510,7 +512,7 @@ STM32_protocol.prototype.upload_procedure = function (step) {
|
|||
console.log(message);
|
||||
$('span.progressLabel').text(message + ' ...');
|
||||
|
||||
self.send([self.command.erase, 0xBC], 1, function (reply) { // 0x43 ^ 0xFF
|
||||
self.send([self.command.erase, self.command.erase ^ 0xFF], 1, function (reply) {
|
||||
if (self.verify_response(self.status.ACK, reply)) {
|
||||
// the bootloader receives one byte that contains N, the number of pages to be erased – 1
|
||||
var max_address = self.hex.data[self.hex.data.length - 1].address + self.hex.data[self.hex.data.length - 1].bytes - 0x8000000,
|
||||
|
@ -555,7 +557,7 @@ STM32_protocol.prototype.upload_procedure = function (step) {
|
|||
|
||||
// console.log('STM32 - Writing to: 0x' + address.toString(16) + ', ' + bytes_to_write + ' bytes');
|
||||
|
||||
self.send([self.command.write_memory, 0xCE], 1, function (reply) { // 0x31 ^ 0xFF
|
||||
self.send([self.command.write_memory, self.command.write_memory ^ 0xFF], 1, function (reply) {
|
||||
if (self.verify_response(self.status.ACK, reply)) {
|
||||
// address needs to be transmitted as 32 bit integer, we need to bit shift each byte out and then calculate address checksum
|
||||
var address_arr = [(address >> 24), (address >> 16), (address >> 8), address];
|
||||
|
@ -635,7 +637,7 @@ STM32_protocol.prototype.upload_procedure = function (step) {
|
|||
|
||||
// console.log('STM32 - Reading from: 0x' + address.toString(16) + ', ' + bytes_to_read + ' bytes');
|
||||
|
||||
self.send([self.command.read_memory, 0xEE], 1, function (reply) { // 0x11 ^ 0xFF
|
||||
self.send([self.command.read_memory, self.command.read_memory ^ 0xFF], 1, function (reply) {
|
||||
if (self.verify_response(self.status.ACK, reply)) {
|
||||
var address_arr = [(address >> 24), (address >> 16), (address >> 8), address];
|
||||
var address_checksum = address_arr[0] ^ address_arr[1] ^ address_arr[2] ^ address_arr[3];
|
||||
|
@ -719,7 +721,7 @@ STM32_protocol.prototype.upload_procedure = function (step) {
|
|||
// memory address = 4 bytes, 1st high byte, 4th low byte, 5th byte = checksum XOR(byte 1, byte 2, byte 3, byte 4)
|
||||
console.log('Sending GO command: 0x8000000');
|
||||
|
||||
self.send([self.command.go, 0xDE], 1, function (reply) { // 0x21 ^ 0xFF
|
||||
self.send([self.command.go, self.command.go ^ 0xFF], 1, function (reply) {
|
||||
if (self.verify_response(self.status.ACK, reply)) {
|
||||
var gt_address = 0x8000000,
|
||||
address = [(gt_address >> 24), (gt_address >> 16), (gt_address >> 8), gt_address],
|
||||
|
|
|
@ -38,7 +38,10 @@
|
|||
<script type="text/javascript" src="./js/libraries/q.js"></script>
|
||||
<script type="text/javascript" src="./js/libraries/google-analytics-bundle.js"></script>
|
||||
<script type="text/javascript" src="./js/libraries/jquery-2.1.3.min.js"></script>
|
||||
<<<<<<< HEAD
|
||||
<script type="text/javascript" src="./js/libraries/jquery-ui-1.11.2.min.js"></script>
|
||||
=======
|
||||
>>>>>>> origin/baseflight-configurator-development
|
||||
<script type="text/javascript" src="./js/libraries/d3.min.js"></script>
|
||||
<script type="text/javascript" src="./js/libraries/jquery.nouislider.all.min.js"></script>
|
||||
<script type="text/javascript" src="./js/libraries/three/three.min.js"></script>
|
||||
|
|
|
@ -183,6 +183,12 @@
|
|||
<span i18n="configurationBatteryMinimum"></span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="number">
|
||||
<label>
|
||||
<input type="number" name="warningcellvoltage" step="0.1" min="1" max="5" />
|
||||
<span i18n="configurationBatteryWarning"></span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="number">
|
||||
<label>
|
||||
<input type="number" name="maxcellvoltage" step="0.1" min="1" max="5" />
|
||||
|
|
|
@ -276,6 +276,7 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
|
|||
|
||||
// fill battery
|
||||
$('input[name="mincellvoltage"]').val(MISC.vbatmincellvoltage);
|
||||
$('input[name="warningcellvoltage"]').val(MISC.vbatwarningcellvoltage);
|
||||
$('input[name="maxcellvoltage"]').val(MISC.vbatmaxcellvoltage);
|
||||
$('input[name="warningcellvoltage"]').val(MISC.vbatwarningcellvoltage);
|
||||
$('input[name="voltagescale"]').val(MISC.vbatscale);
|
||||
|
@ -347,6 +348,7 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
|
|||
MISC.mincommand = parseInt($('input[name="mincommand"]').val());
|
||||
|
||||
MISC.vbatmincellvoltage = parseFloat($('input[name="mincellvoltage"]').val());
|
||||
MISC.vbatwarningcellvoltage = parseFloat($('input[name="warningcellvoltage"]').val());
|
||||
MISC.vbatmaxcellvoltage = parseFloat($('input[name="maxcellvoltage"]').val());
|
||||
MISC.vbatwarningcellvoltage = parseFloat($('input[name="warningcellvoltage"]').val());
|
||||
MISC.vbatscale = parseInt($('input[name="voltagescale"]').val());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue