Skip to content
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

Merged
merged 19 commits into from
Jul 20, 2024
Merged

Tk joystik control #2

merged 19 commits into from
Jul 20, 2024

Conversation

dimazdoks
Copy link
Owner

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.

@@ -1142,7 +1152,7 @@ private slots:
QTimer _csvLogTimer;
QFile _csvLogFile;

bool _joystickEnabled = false;
bool _joystickEnabled = false;

Choose a reason for hiding this comment

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

Code style issue

Comment on lines +11 to +12
<file alias="DayLightActions.qml">src/ui/toolbar/DayLightActions.qml</file>
<file alias="NightLightActions.qml">src/ui/toolbar/NightLightActions.qml</file>

Choose a reason for hiding this comment

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

Code style issue

Copy link
Owner Author

Choose a reason for hiding this comment

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

тут все окей

Comment on lines +44 to +89
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
);
};

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?

Copy link
Owner Author

Choose a reason for hiding this comment

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

what do you mean?

Comment on lines 18 to 19
#define DAY_LIGHT_SERVO 3
#define NIGHT_LIGHT_SERVO 11

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


// emit servoChannelsChanged(pwmServoValues);
// }

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]);

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);

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?

Copy link
Owner Author

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

@dimazdoks dimazdoks changed the base branch from Stable_V4.3 to termit-dev July 5, 2024 09:07
@dimazdoks dimazdoks merged commit f4a8558 into termit-dev Jul 20, 2024
3 of 6 checks passed
@dimazdoks dimazdoks deleted the TK_joystik-control branch July 20, 2024 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants