Rc controller window#174
Conversation
sergei1152
left a comment
There was a problem hiding this comment.
Looks alot better. Please squash the commits in this PR, as you've got alot of the same ones on here
| @@ -0,0 +1,23 @@ | |||
| <!DOCTYPE html> | |||
There was a problem hiding this comment.
This is a window, not a view. File name wrong
| </div> | ||
| </div> | ||
|
|
||
| <div class="controllerInputsView square back twothree"> |
There was a problem hiding this comment.
Same thing as the other pr in terms of using classes
| position: relative; | ||
| margin-left: 43%; | ||
| //margin-right: 50%; | ||
| //margin-bottom: 50%; |
| @@ -0,0 +1,13 @@ | |||
| var SettingsLoader=require('../app/util/PersistentSettings'); | |||
|
|
|||
| var vehicle_channel_config = { | |||
There was a problem hiding this comment.
This file is too speficic. Let's generalize it to just vehicle_config for vehicle all vehicle specific settings
| internal_battery_cell_count: 3, | ||
| motor_battery_cell_count: 4 | ||
| motor_battery_cell_count: 4, | ||
| type: "fixed_wing" |
There was a problem hiding this comment.
Rename the key to be "vehicle_type"
| @@ -0,0 +1,16 @@ | |||
| var ControllerInputsView = require('../../app/views/ControllerInputsView')(Marionette, Backbone); | |||
| var WindowShortCuts = require('../../app/core/WindowShortcuts'); | |||
|
|
|||
There was a problem hiding this comment.
This is a window, not view. Rename file
| var Template = require('../util/Template'); | ||
| var TelemetryData = remote.require('./app/models/TelemetryData'); | ||
| var Logger = remote.require('./app/util/Logger'); | ||
| var Validator = require('../util/Validator'); |
There was a problem hiding this comment.
Remove modules you're not using from here and the file header, like the validator
| this.setOnOff(ch5); | ||
| }, | ||
|
|
||
| onRender: function(){ |
…View. Squashed commit.
49a32cb to
9b24471
Compare
a888a4f to
7021bdc
Compare
|
Could you also display all the channel inputs and outputs in this window? They can be numeric, it'd make this view more useful. Also make sure to center the elements relative to the window. |
|
Never mind actually, the calibration window should have that information anyways. |
| this.type = picpilot_conf.get('vehicle_type'); | ||
| }, | ||
|
|
||
| rcIsOff: function(data){ |
There was a problem hiding this comment.
repeated code. It'd be better to just make this function take in an array or 5 parameters and let it check if any of them are -10000
| this.ui.front23.css({"margin-left": "43%","margin-top":"43%", | ||
| "background-color": "rgba(244,122,122,1)", | ||
| "border-color": "rgba(244,122,122,1"}); | ||
| }else{ |
There was a problem hiding this comment.
add a space before and after the else
| } | ||
| }, | ||
| /* | ||
| onRender: function () { |
| if(val != null){ | ||
| if(this.control_off){ | ||
| this.ui.ch1_text.text(""); | ||
| }else{ |
There was a problem hiding this comment.
space. Try to fix all your if and else statements this way (add sufficient space in the curly brackets. ie. }else{ -> } else {
and if(val != null){ -> if (val != null) {
| </div> | ||
|
|
||
| <div class="square back twothree"> | ||
| <div class="circle front twothree"> |
There was a problem hiding this comment.
you should't need to declare a child with the same class as a parent, as it defeats the purpose of having a class. You'll have to modify your css to account for this
…ied the class structure in html file
A Separate window for displaying RC controller values.