Skip to content

Commit

Permalink
Cleanup more F3 code (betaflight#3747)
Browse files Browse the repository at this point in the history
* Remove boards.js

* Cleanup unused blocksize
  • Loading branch information
haslinghuis authored and chmelevskij committed Apr 27, 2024
1 parent 1b8e899 commit ae2738a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 108 deletions.
95 changes: 0 additions & 95 deletions src/js/boards.js

This file was deleted.

9 changes: 2 additions & 7 deletions src/js/tabs/onboard_logging.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ const onboard_logging = {
writeError: false,

BLOCK_SIZE: 4096,
VCP_BLOCK_SIZE_3_0: 512,
VCP_BLOCK_SIZE: 4096,
};

onboard_logging.initialize = function (callback) {
Expand Down Expand Up @@ -434,11 +432,8 @@ onboard_logging.initialize = function (callback) {

function flash_save_begin() {
if (GUI.connected_to) {
if (FC.boardHasVcp()) {
self.blockSize = self.VCP_BLOCK_SIZE;
} else {
self.blockSize = self.BLOCK_SIZE;
}

self.blockSize = self.BLOCK_SIZE;

// Begin by refreshing the occupied size in case it changed while the tab was open
flash_update_summary(function() {
Expand Down
6 changes: 0 additions & 6 deletions src/js/tabs/ports.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import FC from '../fc';
import MSP from '../msp';
import MSPCodes from '../msp/MSPCodes';
import { API_VERSION_1_42, API_VERSION_1_43, API_VERSION_1_45 } from '../data_storage';
import BOARD from '../boards';
import $ from 'jquery';

const ports = {
Expand All @@ -17,8 +16,6 @@ const ports = {
ports.initialize = function (callback) {
const self = this;

let board_definition = {};

const functionRules = [
{ name: 'MSP', groups: ['configuration', 'msp'], maxPorts: 2 },
{ name: 'GPS', groups: ['sensors'], maxPorts: 1 },
Expand Down Expand Up @@ -112,9 +109,6 @@ ports.initialize = function (callback) {

function on_configuration_loaded_handler() {
$('#content').load("./tabs/ports.html", on_tab_loaded_handler);

board_definition = BOARD.find_board_definition(FC.CONFIG.boardIdentifier);
console.log('Using board definition', board_definition);
}
}

Expand Down

0 comments on commit ae2738a

Please sign in to comment.