Browse Source

Sub: Disable CH6 Tuning

master
Jacob Walser 8 years ago committed by Andrew Tridgell
parent
commit
3010114adb
  1. 2
      ArduSub/ArduSub.cpp
  2. 2
      ArduSub/Parameters.cpp
  3. 2
      ArduSub/Parameters.h
  4. 2
      ArduSub/Sub.h
  5. 8
      ArduSub/config.h
  6. 3
      ArduSub/tuning.cpp

2
ArduSub/ArduSub.cpp

@ -465,8 +465,10 @@ void Sub::three_hz_loop() @@ -465,8 +465,10 @@ void Sub::three_hz_loop()
update_events();
#if CH6_TUNE_ENABLED == ENABLED
// update ch6 in flight tuning
tuning();
#endif
}
// one_hz_loop - runs at 1Hz

2
ArduSub/Parameters.cpp

@ -366,6 +366,7 @@ const AP_Param::Info Sub::var_info[] = { @@ -366,6 +366,7 @@ const AP_Param::Info Sub::var_info[] = {
// @Values: 0:Normal Start-up, 1:Start-up in ESC Calibration mode if throttle high, 2:Start-up in ESC Calibration mode regardless of throttle, 9:Disabled
GSCALAR(esc_calibrate, "ESC_CALIBRATION", 0),
#if CH6_TUNE_ENABLED == ENABLED
// @Param: TUNE
// @DisplayName: Channel 6 Tuning
// @Description: Controls which parameters (normally PID gains) are being tuned with transmitter's channel 6 knob
@ -386,6 +387,7 @@ const AP_Param::Info Sub::var_info[] = { @@ -386,6 +387,7 @@ const AP_Param::Info Sub::var_info[] = {
// @User: Standard
// @Range: 0 32767
GSCALAR(radio_tuning_high, "TUNE_HIGH", 1000),
#endif
#if AUXSW_ENABLED == ENABLED
// @Param: CH7_OPT

2
ArduSub/Parameters.h

@ -343,9 +343,11 @@ public: @@ -343,9 +343,11 @@ public:
//
AP_Int32 log_bitmask;
AP_Int8 esc_calibrate;
#if CH6_TUNE_ENABLED == ENABLED
AP_Int8 radio_tuning;
AP_Int16 radio_tuning_high;
AP_Int16 radio_tuning_low;
#endif
AP_Int8 ch7_option;
AP_Int8 ch8_option;
AP_Int8 ch9_option;

2
ArduSub/Sub.h

@ -859,7 +859,9 @@ private: @@ -859,7 +859,9 @@ private:
void check_usb_mux(void);
bool should_log(uint32_t mask);
void print_hit_enter();
#if CH6_TUNE_ENABLED == ENABLED
void tuning();
#endif
void gcs_send_text_fmt(MAV_SEVERITY severity, const char *fmt, ...);
bool start_command(const AP_Mission::Mission_Command& cmd);
bool verify_command(const AP_Mission::Mission_Command& cmd);

8
ArduSub/config.h

@ -86,6 +86,14 @@ @@ -86,6 +86,14 @@
# define RC_FAST_SPEED 490
#endif
//////////////////////////////////////////////////////////////////////////////
// Channel 6 Tuning
//
#ifndef CH6_TUNE_ENABLED
# define CH6_TUNE_ENABLED DISABLED
#endif
//////////////////////////////////////////////////////////////////////////////
// Aux Switches
//

3
ArduSub/tuning.cpp

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
/// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-
#include "Sub.h"
#if CH6_TUNE_ENABLED == ENABLED
/*
* tuning.pde - function to update various parameters in flight using the ch6 tuning knob
@ -190,3 +190,4 @@ void Sub::tuning() { @@ -190,3 +190,4 @@ void Sub::tuning() {
break;
}
}
#endif

Loading…
Cancel
Save