-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tk joystik control #2
Conversation
…n light buttons and fixing logic of toggling light
src/Vehicle/Vehicle.h
Outdated
@@ -1142,7 +1152,7 @@ private slots: | |||
QTimer _csvLogTimer; | |||
QFile _csvLogFile; | |||
|
|||
bool _joystickEnabled = false; | |||
bool _joystickEnabled = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code style issue
<file alias="DayLightActions.qml">src/ui/toolbar/DayLightActions.qml</file> | ||
<file alias="NightLightActions.qml">src/ui/toolbar/NightLightActions.qml</file> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code style issue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
тут все окей
void ServoControl::dayLightEnable(int _defaultComponentId) { | ||
// _defaultComponentId | ||
_vehicle->sendCommand( | ||
_defaultComponentId, | ||
MAV_CMD_DO_SET_SERVO, | ||
true, | ||
DAY_LIGHT_SERVO, | ||
SERVO_PWM_ON | ||
); | ||
}; | ||
|
||
// ---------------------------------------------------------------------------- | ||
void ServoControl::dayLightDisable(int _defaultComponentId) { | ||
// _defaultComponentId | ||
_vehicle->sendCommand( | ||
_defaultComponentId, | ||
MAV_CMD_DO_SET_SERVO, | ||
true, | ||
DAY_LIGHT_SERVO, | ||
SERVO_PWM_OFF | ||
); | ||
}; | ||
|
||
// ---------------------------------------------------------------------------- | ||
void ServoControl::nightLightEnable(int _defaultComponentId) { | ||
// _defaultComponentId | ||
_vehicle->sendCommand( | ||
_defaultComponentId, | ||
MAV_CMD_DO_SET_SERVO, | ||
true, | ||
NIGHT_LIGHT_SERVO, | ||
SERVO_PWM_ON | ||
); | ||
}; | ||
|
||
// ---------------------------------------------------------------------------- | ||
void ServoControl::nightLightDisable(int _defaultComponentId) { | ||
// _defaultComponentId | ||
_vehicle->sendCommand( | ||
_defaultComponentId, | ||
MAV_CMD_DO_SET_SERVO, | ||
true, | ||
NIGHT_LIGHT_SERVO, | ||
SERVO_PWM_OFF | ||
); | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's think about ternary operator here. Can we make it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what do you mean?
src/Servo/ServoControl.cc
Outdated
#define DAY_LIGHT_SERVO 3 | ||
#define NIGHT_LIGHT_SERVO 11 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note for next release: Need to make all of this fields flexible throw GUI
src/Vehicle/Vehicle.cc
Outdated
|
||
// emit servoChannelsChanged(pwmServoValues); | ||
// } | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this? Why it's commented? Need to add small comments about this functionality
@@ -992,7 +1000,8 @@ public slots: | |||
/// @param channelCount Number of available channels, cMaxRcChannels max | |||
/// @param pwmValues -1 signals channel not available | |||
void rcChannelsChanged (int channelCount, int pwmValues[cMaxRcChannels]); | |||
|
|||
// void servoChannelsChanged (int pwmServoValues[ServoControl::cMaxServoPackets]); | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same - non understandable functionality
{ | ||
_addFact(&_dayLightFact, _dayLightFactName); | ||
_addFact(&_nightLightFact, _nightLightFactName); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is servo functionality status, correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is fact group classes, it part of logic of handling events from mavlink and updating states
Description
Test Steps
Checklist:
Related Issue
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.