Skip to content
Snippets Groups Projects
Commit 9c3cbb31 authored by Colton Glick's avatar Colton Glick
Browse files

Changed crazyflie timer

parent ecf988d5
No related branches found
No related tags found
1 merge request!77Groundstation gui rough edits
...@@ -198,7 +198,7 @@ MainWindow::MainWindow(QWidget *parent) : ...@@ -198,7 +198,7 @@ MainWindow::MainWindow(QWidget *parent) :
/* Start the things */ /* Start the things */
trackerTimer->start(100); trackerTimer->start(100);
crazyflieTimer->start(100); crazyflieTimer->start(300);
//workerThread->start(); //workerThread->start();
cwThread->start(); cwThread->start();
cfThread->start(); cfThread->start();
...@@ -833,6 +833,7 @@ void MainWindow::on_applySetpointButton_clicked() ...@@ -833,6 +833,7 @@ void MainWindow::on_applySetpointButton_clicked()
emit(rateSetpointSignal(sp_roll, sp_pitch, sp_yaw, sp_thrust)); emit(rateSetpointSignal(sp_roll, sp_pitch, sp_yaw, sp_thrust));
} }
trigger_send_setpoint();
} }
...@@ -851,6 +852,8 @@ void MainWindow::on_stopSetpointButton_clicked() ...@@ -851,6 +852,8 @@ void MainWindow::on_stopSetpointButton_clicked()
//send as rate setpoint //send as rate setpoint
emit(rateSetpointSignal(sp_roll, sp_pitch, sp_yaw, sp_thrust)); emit(rateSetpointSignal(sp_roll, sp_pitch, sp_yaw, sp_thrust));
} }
trigger_send_setpoint();
} }
void MainWindow::on_tActual_sliderMoved(int position) void MainWindow::on_tActual_sliderMoved(int position)
{ {
...@@ -978,6 +981,7 @@ void MainWindow::on_pb_configThrust_clicked() ...@@ -978,6 +981,7 @@ void MainWindow::on_pb_configThrust_clicked()
void MainWindow::on_rbManualSetpoint_toggled(bool checked) void MainWindow::on_rbManualSetpoint_toggled(bool checked)
{ {
if(checked) { if(checked) {
crazyflieTimer->start(300); //slower rate for manual setpoints
emit(mixedSetpointSignal(0, 0, 0, 0)); emit(mixedSetpointSignal(0, 0, 0, 0));
emit(rateSetpointSignal(0, 0, 0, 0)); emit(rateSetpointSignal(0, 0, 0, 0));
emit(angleSetpointSignal(0, 0, 0, 0)); emit(angleSetpointSignal(0, 0, 0, 0));
...@@ -1001,6 +1005,7 @@ void MainWindow::on_rbGamepadControl_toggled(bool checked) ...@@ -1001,6 +1005,7 @@ void MainWindow::on_rbGamepadControl_toggled(bool checked)
{ {
if(checked){ if(checked){
crazyflieTimer->start(100); //faster rate for gamepad
ui->rollSetpointBox-> setEnabled(false); ui->rollSetpointBox-> setEnabled(false);
ui->pitchSetpointBox-> setEnabled(false); ui->pitchSetpointBox-> setEnabled(false);
ui->yawSetpointBox-> setEnabled(false); ui->yawSetpointBox-> setEnabled(false);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment