Commit e3bfa208 authored by Pawel Spychalski (DzikuVx)'s avatar Pawel Spychalski (DzikuVx)
Browse files

Current and Voltage

parent d4cd6383
This diff is collapsed.
......@@ -313,6 +313,20 @@
margin: 1em;
}
.tab-motors .output-stats-table {
font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
font-size: 1.5em;
width: 100%;
}
.tab-motors .output-stats-table th {
text-align: left;
}
.tab-motors .output-stats-table td {
text-align: left;
}
.tab-servos .title {
margin-top: 0;
line-height: 30px;
......
......@@ -25,11 +25,19 @@
</div>
</div>
<div class="half">
<table class="cf-table">
<table class="output-stats-table">
<tr>
<th>Acc. noise RMS</th>
<td class="acc-rms"></td>
</tr>
<tr>
<th>Current [A]</th>
<td class="current-current"></td>
</tr>
<tr>
<th>Voltage [V]</th>
<td class="current-voltage"></td>
</tr>
</table>
</div>
<div class="clear-both"></div>
......
/*global helper,MSP,MSPChainerClass,googleAnalytics,GUI,mspHelper,MOTOR_RULES,TABS,$,MSPCodes,ANALOG,MOTOR_DATA,chrome,PLATFORM_MULTIROTOR,BF_CONFIG,PLATFORM_TRICOPTER,SERVO_RULES,FC,SERVO_CONFIG,SENSOR_DATA,_3D,MISC,MIXER_CONFIG,OUTPUT_MAPPING*/
'use strict';
TABS.motors = {
......@@ -175,7 +176,7 @@ TABS.motors.initialize = function (callback) {
}
}
function servos_update(save_configuration_to_eeprom) {
function servos_update() {
$servoConfigTable.find('tr:not(".main")').each(function () {
var info = $(this).data('info');
......@@ -227,7 +228,7 @@ TABS.motors.initialize = function (callback) {
});
$('a.update').click(function () {
servos_update(true);
servos_update();
});
}
......@@ -260,17 +261,19 @@ TABS.motors.initialize = function (callback) {
accel_offset = [0, 0, 0],
accel_offset_established = false;
let $rmsHelper = $(".acc-rms");
let $rmsHelper = $(".acc-rms"),
$currentHelper = $(".current-current"),
$voltageHelper = $(".current-voltage");
// timer initialization
helper.interval.killAll(['motor_and_status_pull', 'global_data_refresh', 'msp-load-update']);
helper.mspBalancedInterval.flush();
helper.interval.add('IMU_pull', function imu_data_pull() {
helper.interval.add('IMU_pull', function () {
/*
* Enable balancer
*/
* Enable balancer
*/
if (helper.mspQueue.shouldDrop()) {
update_accel_graph();
return;
......@@ -279,6 +282,11 @@ TABS.motors.initialize = function (callback) {
MSP.send_message(MSPCodes.MSP_RAW_IMU, false, false, update_accel_graph);
}, 25, true);
helper.interval.add('ANALOG_pull', function () {
$currentHelper.html(ANALOG.amperage.toFixed(2));
$voltageHelper.html(ANALOG.voltage.toFixed(2));
}, 100, true);
function update_accel_graph() {
if (!accel_offset_established) {
......
......@@ -427,7 +427,7 @@ TABS.sensors.initialize = function (callback) {
// data pulling timers
if (checkboxes[0] || checkboxes[1] || checkboxes[2]) {
helper.interval.add('IMU_pull', function imu_data_pull() {
helper.interval.add('IMU_pull', function () {
/*
* Enable balancer
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment