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

Remove mid_rc setting #3314

Merged
merged 1 commit into from
Jun 6, 2018
Merged

Remove mid_rc setting #3314

merged 1 commit into from
Jun 6, 2018

Conversation

digitalentity
Copy link
Member

@digitalentity digitalentity added this to the 2.0 milestone Jun 3, 2018
@shellixyz
Copy link
Collaborator

Looking good to me I don't see any case where changing mid_rc could be useful. All radios have stick center value at 1500µs right ?

@digitalentity
Copy link
Member Author

Not all radios produce valus in [1000;2000] range with 1500 mid (i.e. Spektrum), but we have rxrange to account for that.

@digitalentity digitalentity merged commit 4b95c2e into development Jun 6, 2018
@digitalentity digitalentity deleted the de_remove_midrc branch June 6, 2018 18:03
@fiam
Copy link
Member

fiam commented Jun 6, 2018

We need to remove it from the configurator too.

@stronnag
Copy link
Collaborator

stronnag commented Jun 6, 2018

and here ... or mark unused

%% sbus_channels.c 
./src/main/rx/sbus_channels.c: In function 'sbusChannelsInit':
./src/main/rx/sbus_channels.c:87:41: warning: unused parameter 'rxConfig' [-Wunused-parameter]
 void sbusChannelsInit(const rxConfig_t *rxConfig, rxRuntimeConfig_t *rxRuntimeConfig)
                       ~~~~~~~~~~~~~~~~~~^~~~~~~~

@NeilGaede
Copy link

mid_rc is still needed as a reference when using use_midthr_for althold = 1. Needs to be changed to use mid_rc, not mid_thr since that is an expo weighting center value.

@digitalentity
Copy link
Member Author

digitalentity commented Jun 8, 2018 via email

shellixyz added a commit to shellixyz/inav that referenced this pull request Jun 8, 2018
commit 8e419c6
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Thu Jun 7 16:34:16 2018 +0100

    Round rather than truncate when updating GPS_directionToHome

    Makes taking off in straight line north produce a home direction
    of 180º rather than 179º.

commit 002ebbd
Merge: ec31f99 e4b99ba
Author: Alberto García Hierro <fiam@rm-fr.net>
Date:   Thu Jun 7 16:32:56 2018 +0100

    Merge pull request iNavFlight#3330 from iNavFlight/agh_maps_draw_over_center

    When drawing a POI over the map center, alternate

commit ec31f99
Merge: 4b95c2e c8b26b4
Author: Paweł Spychalski <pspychalski@gmail.com>
Date:   Thu Jun 7 15:03:59 2018 +0200

    Merge pull request iNavFlight#3331 from iNavFlight/dzikuvx-rangefinder-cleanup

    Cleanup of unused functions

commit 4b95c2e
Merge: f7c2824 d452344
Author: Konstantin Sharlaimov <konstantin.sharlaimov@gmail.com>
Date:   Wed Jun 6 20:03:43 2018 +0200

    Merge pull request iNavFlight#3314 from iNavFlight/de_remove_midrc

    Remove mid_rc setting

commit c8b26b4
Author: Pawel Spychalski (DzikuVx) <pspychalski@gmail.com>
Date:   Wed Jun 6 15:16:11 2018 +0200

    Cleanup of unused functions

commit e4b99ba
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Wed Jun 6 12:58:43 2018 +0100

    When drawing a POI over the map center, alternate

    Draw the map center symbol for 1s, then the POI symbol for 1s.
    This feels more natural than not drawing the POI when both are
    very close, since flying over the home location would make the
    craft disappear from the map.

commit f7c2824
Merge: 544e03b d624f65
Author: Alberto García Hierro <fiam@rm-fr.net>
Date:   Wed Jun 6 12:33:18 2018 +0100

    Merge pull request iNavFlight#3247 from iNavFlight/agh_home_heading_correction

    Correct home yaw when a valid heading is acquired

commit 544e03b
Merge: 0e0dba5 616ccaa
Author: Alberto García Hierro <fiam@rm-fr.net>
Date:   Wed Jun 6 12:32:56 2018 +0100

    Merge pull request iNavFlight#3305 from iNavFlight/agh_fix_map_radar_directions

    Fix directions of drawing for symbols in map and radar mode

commit 0e0dba5
Merge: 50847b9 85c690a
Author: Paweł Spychalski <pspychalski@gmail.com>
Date:   Wed Jun 6 09:50:44 2018 +0200

    Merge pull request iNavFlight#3328 from iNavFlight/dzikuvx-rangefinder-rename

    I2C rangefinder rename and docs update

commit 85c690a
Author: Pawel Spychalski (DzikuVx) <pspychalski@gmail.com>
Date:   Wed Jun 6 08:50:54 2018 +0200

    Fixed build

commit 2b7b47e
Author: Pawel Spychalski (DzikuVx) <pspychalski@gmail.com>
Date:   Wed Jun 6 08:43:45 2018 +0200

    I2C rangefinder rename

commit 50847b9
Merge: 4374471 a63049d
Author: Alberto García Hierro <fiam@rm-fr.net>
Date:   Mon Jun 4 21:47:12 2018 +0100

    Merge pull request iNavFlight#3320 from iNavFlight/agh_update_gitignore

    Remove /src/main/fc/settings_generated.{h, c} from .gitignore

commit a63049d
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Mon Jun 4 18:46:33 2018 +0100

    Remove /src/main/fc/settings_generated.{h, c} from .gitignore

    The generated files are now in obj/, so there's no need to ignore
    the ones in the old location. Also, having the old generated files
    in place can make the compiler use the old outdated files if someone
    built the firmware before, so it's better to make them easily noticeable
    via git status.

commit d452344
Author: Konstantin (DigitalEntity) Sharlaimov <konstantin.sharlaimov@gmail.com>
Date:   Sun Jun 3 20:15:57 2018 +0200

    Remove MIDRC setting

commit 4374471
Merge: 59864b8 dd86a0b
Author: Konstantin Sharlaimov <konstantin.sharlaimov@gmail.com>
Date:   Sat Jun 2 19:24:00 2018 +0200

    Merge pull request iNavFlight#3296 from shellixyz/restore_osd_sw

    Restore OSD SW

commit 59864b8
Merge: ff60ce8 25697c0
Author: Konstantin Sharlaimov <konstantin.sharlaimov@gmail.com>
Date:   Sat Jun 2 19:23:40 2018 +0200

    Merge pull request iNavFlight#3265 from teckel12/te_make-current-meter-feature-work

    make isAmperageConfigured respect FEATURE_CURRENT_METER and not just current_meter_type

commit ff60ce8
Merge: e28f7fa 680bf8b
Author: Konstantin Sharlaimov <konstantin.sharlaimov@gmail.com>
Date:   Sat Jun 2 19:22:51 2018 +0200

    Merge pull request iNavFlight#3304 from giacomo892/arming_checks_rework

    Disable arming in AH for FW unless launch mode is enabled

commit e28f7fa
Merge: a2a60d4 05c5f0f
Author: Konstantin Sharlaimov <konstantin.sharlaimov@gmail.com>
Date:   Sat Jun 2 19:21:56 2018 +0200

    Merge pull request iNavFlight#3303 from giacomo892/nav_launch_safety_fix

    NAV_LAUNCH extra safety

commit a2a60d4
Merge: 4d5cc76 bf0f05a
Author: Konstantin Sharlaimov <konstantin.sharlaimov@gmail.com>
Date:   Sat Jun 2 19:21:08 2018 +0200

    Merge pull request iNavFlight#3275 from iNavFlight/agh_parallel_build

    Move build-stamp and generated files to obj/main/$(TARGET)

commit 616ccaa
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Thu May 31 21:38:27 2018 +0100

    Fix directions of drawing for symbols in map and radar mode

    - X axis was reversed in map mode
    - Home direction rotation was not corrected for the current heading
    in radar mode

commit 680bf8b
Author: giacomo892 <giacomo892@users.noreply.github.com>
Date:   Thu May 31 17:19:01 2018 +0200

    Disable arming in AH for FW unless launch mode is enabled

commit 05c5f0f
Author: giacomo892 <giacomo892@users.noreply.github.com>
Date:   Thu May 31 16:29:21 2018 +0200

    Extra safety for NAV_LAUNCH if enabled via BOX

commit dd86a0b
Author: Michel Pastor <shellixyz@gmail.com>
Date:   Thu May 31 01:12:44 2018 +0200

    Restore OSD SW

    It is nice to be able to be able to hide the OSD without wasting an OSD
    layout

commit bf0f05a
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Fri May 25 11:00:12 2018 +0100

    Move build-stamp and generatic files to obj/main/$(TARGET)

    This allows target level parallel builds, since now there are no
    shared files between targets.

    Fixes iNavFlight#3261

commit 25697c0
Author: Tim Eckel <tim@leethost.com>
Date:   Tue May 22 22:35:37 2018 -0400

    make isAmperageConfigured respect FEATURE_CURRENT_METER and not just current_meter_type

commit d624f65
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Tue May 22 11:05:00 2018 +0100

    Rename yawRotation to fakeToRealYawOffset

    Also, add a small comment explaining the logic behind the home
    yaw adjustment.

commit 200a85a
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Tue May 22 11:01:34 2018 +0100

    Make setHomePosition() accept a new argument indicating the home flags

    Callers can specify wether XY, Z and HEADING are valid for the new
    home position.

commit 3e0ae8b
Author: Alberto García Hierro <alberto@garciahierro.com>
Date:   Sun May 20 16:04:19 2018 +0100

    Correct home yaw when a valid heading is acquired

    This is specially relevant in FW without compass, since the home
    location will typically be stored while the craft hasn't yet moved
    and a CoG derived heading is not determined yet.

    The navigation code checks when the heading transitions from invalid
    to valid in updateActualHeading(), calculates the rotation from the old
    invalid heading (using bootup heading as 0º) to the real one and
    applies to posControl.homePosition.yaw.

    In order to save a bit of memory, isHomeValid has been replaced
    with a bitmask which stored several flags relative to the home
    location.
@MRC3742
Copy link

MRC3742 commented Jun 10, 2018

@digitalentity This issue seems to be related to this PR. While building in Linux Mint from current development branch I am encountering the following error midway through the build that terminates the process.

%% rc_modes.c
%% runtime_config.c
%% settings.c
In file included from ./src/main/fc/settings.c:11:0:
./src/main/fc/settings_generated.c:751:85: error: 'rxConfig_t {aka struct rxConfig_s}' has no member named 'midrc'
{ {115, 38, 0, 0, 0}, VAR_UINT16 | MASTER_VALUE, .config.minmax.indexes = {62, 64}, offsetof(rxConfig_t, midrc) },
^~~~~~~~~~~~~~~~~~
Makefile:337: recipe for target 'obj/main/SPRACINGF3EVO/fc/settings.o' failed
make: *** [obj/main/SPRACINGF3EVO/fc/settings.o] Error 1

Commenting out line 751 in file ./src/main/fc/settings_generated.c "// { {115, 38, 0, 0, 0}, VAR_UINT16 | MASTER_VALUE, .config.minmax.indexes = {62, 64}, offsetof(rxConfig_t, midrc) },"
will let the build complete successfully. Could this have been overlooked when removing the mid_rc setting? or is there something wrong in the way I am building it?

@stronnag
Copy link
Collaborator

It's the way you're building it. Development builds fine. It's more likely due to that fact that the location of the generated files has changed, and you have an old file lying around.

Running:

find . -iname settings_generated.[ch] -delete 

will probably resolve the situation.

@MRC3742
Copy link

MRC3742 commented Jun 10, 2018

@ stonnag You are correct. Removing that file allows the build to complete with no errors. Thank You!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants