Skip to content
Snippets Groups Projects
  1. Dec 13, 2016
  2. Dec 02, 2016
  3. Nov 25, 2016
  4. Oct 24, 2016
  5. Oct 04, 2016
  6. Sep 30, 2016
  7. Aug 17, 2016
  8. Aug 07, 2016
  9. Aug 04, 2016
  10. Jun 23, 2016
  11. May 13, 2016
  12. May 10, 2016
  13. May 09, 2016
    • skyscraper's avatar
      ArduPlane: Fix up after refactoring RC_Channel class · 7f299032
      skyscraper authored
      Further to refactor of RC_Channel class which included
      adding get_xx set_xx methods, change reads and writes to the public members
      to calls to  get and set functionsss
      
      old public member(int16_t)   get function -> int16_t     set function (int16_t)
      (expression where c is an object of type RC_Channel)
      c.radio_in                     c.get_radio_in()           c.set_radio_in(v)
      c.control_in                   c.get_control_in()         c.set_control_in(v)
      c.servo_out                    c.get_servo_out()          c.set_servo_out(v)
      c.pwm_out                      c.get_pwm_out()            // use existing
      c.radio_out                    c.get_radio_out()          c.set_radio_out(v)
      c.radio_max                    c.get_radio_max()          c.set_radio_max(v)
      c.radio_min                    c.get_radio_min()          c.set_radio_min(v)
      c.radio_trim                   c.get_radio_trim()         c.set_radio_trim(v);
      
      c.min_max_configured() // return true if min and max are configured
      
      Because data members of RC_Channels are now private and so cannot be written directly
       some overloads are provided in the Plane classes to provide the old functionality
      
      new overload Plane::stick_mix_channel(RC_Channel *channel)
      which forwards to the previously existing
      void stick_mix_channel(RC_Channel *channel, int16_t &servo_out);
      
      new overload Plane::channel_output_mixer(Rc_Channel* , RC_Channel*)const
      which forwards to
      (uint8_t mixing_type, int16_t & chan1, int16_t & chan2)const;
      
      Rename functions
      
       RC_Channel_aux::set_radio_trim(Aux_servo_function_t function)
          to RC_Channel_aux::set_trim_to_radio_in_for(Aux_servo_function_t function)
      
       RC_Channel_aux::set_servo_out(Aux_servo_function_t function, int16_t value)
          to RC_Channel_aux::set_servo_out_for(Aux_servo_function_t function, int16_t value)
      
       Rationale:
      
              RC_Channel is a complicated class, which combines
              several functionalities dealing with stick inputs
              in pwm and logical units, logical and actual actuator
              outputs, unit conversion etc, etc
              The intent of this PR is to clarify existing use of
              the class. At the basic level it should now be possible
              to grep all places where private variable is set by
              searching for the set_xx function.
      
              (The wider purpose is to provide a more generic and
              logically simpler method of output mixing. This is a small step)
      7f299032
  14. Apr 21, 2016
  15. Apr 20, 2016
  16. Apr 17, 2016
  17. Apr 14, 2016
  18. Mar 17, 2016
  19. Mar 09, 2016
  20. Mar 03, 2016
  21. Feb 29, 2016
  22. Jan 18, 2016
  23. Jan 08, 2016
  24. Dec 30, 2015
  25. Dec 17, 2015
  26. Nov 08, 2015
  27. May 20, 2015
  28. May 04, 2015
  29. Apr 19, 2015
  30. Dec 31, 2014
Loading