Skip to content
This repository was archived by the owner on Aug 2, 2021. It is now read-only.

Attitude bar view#173

Open
MrSusanovo wants to merge 13 commits into
UWARG:masterfrom
MrSusanovo:AttitudeBarView
Open

Attitude bar view#173
MrSusanovo wants to merge 13 commits into
UWARG:masterfrom
MrSusanovo:AttitudeBarView

Conversation

@MrSusanovo
Copy link
Copy Markdown

@MrSusanovo MrSusanovo commented Jun 21, 2017

A window for displaying attitude change rates in bar-shaped GUI.

  • Allow setting fixed change rates from ground station.
  • Removed those rates from original main window.

Comment thread app/views/AttitudeBarView.js Outdated
},

initialize: function () {
this.degree_or_rad = false; // false stands for degree
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably makes more sense to name this to this.is_rad

Comment thread app/views/AttitudeBarView.js Outdated
initialize: function () {
this.degree_or_rad = false; // false stands for degree
this.aircraft_position_callback = this.aircraftPositionCallback.bind(this);
TelemetryData.addListener('aircraft_position', this.aircraft_position_callback);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Telemetry listeners should occur within the onRender method

Comment thread app/views/AttitudeBarView.js Outdated
var rate = this.ui.pitch_input.val();
if(rate==null) {
rate = 0;
}else{
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a space after and before the curly brackets in the conditional statements

Comment thread templates/views/AttitudeBarView.html Outdated
</span>
</div>
<!-- <p>Yaw Setpoint: <span class="yaw-setpoint-value">--</span> &deg;</p> -->
<div class="attitudeBarView pitch component">
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're not using classes properly. If you've got nested components they don't need to be the same class

Comment thread styles/views/attitude-bar-view.css Outdated
}

.attitudeBarView.roll.block{
//margin-top: 10%;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is invalid css (not how you make comments in css, not should you keep commented code in pull requests.)

@@ -0,0 +1,16 @@
var AttitudeBarView = require('../../app/views/AttitudeBarView')(Marionette, Backbone);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

File name wrong for this file. This one is a window, the other you got correct which are views. Ie. Should be attitude-bar-window.js

…e approrpiate. Delete unecessary models require. Changed HTML layout and css.
Copy link
Copy Markdown

@sergei1152 sergei1152 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Can you make the input box and button styling consistent with the main window
  2. The yaw angle text (below the yaw rate) isnt used or needed)
  3. The default size of the window is pretty big considering what it has to display. It also looks bad (the text overflows) with smaller sizes). If you can make it look nice on a 500wx600h size, that'd be ideal
  4. Having the bar graph filled on the bottom doesnt make too much sense, considering the reference is 0 rad/s, and not negative. I'll show you what i mean on the whiteboard


sendPitchRate: function(e) {
e.preventDefault();
var rate = this.ui.pitch_input.val();
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

theres no input checking on this at all. CHeck out the Validator module for an appropriate check (ie. the isNumeric check should probably work for this)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because currently you can enter a blank space to the input box and it would be sent

Comment thread app/views/AttitudeBarView.js Outdated
} else {
rate = rate %360;
}
console.log(Commands.sendYawRate(rate));
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

console logs should only be used for development

Comment thread app/views/AttitudeBarView.js Outdated
pitch_rate_deg: '.pitch.value-deg',
pitch_front: '.pitch.block.front',
pitch_input: '.input.pitch',
yaw: '.yaw-value',
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not used or updated. THe yaw value is not needed in this view, just the rates, so you can delete this as well as the corresponding html element.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants