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

Cellular telemetry using SIMCom modules #4388

Merged
merged 24 commits into from
May 25, 2019
Merged
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
5e1181c
added sim.c, sim.h
potater1 Feb 18, 2019
00854a8
modified: telemetry.h telemetry.c common.h serial.h settings.yaml sou…
potater1 Feb 18, 2019
59239bc
excluded from F3 builds due to low RAM
potater1 Feb 19, 2019
5c3449b
failsafe turns on transmission, transmission arming condition = WAS_E…
potater1 Feb 20, 2019
1a3c4cf
transmissionState
potater1 Feb 24, 2019
7f0e58a
transmissionState update
potater1 Feb 24, 2019
17c23bf
readState
potater1 Feb 26, 2019
eedb1ee
edits suggested by hali9
potater1 Feb 26, 2019
2535fe6
Cli.md
potater1 Feb 27, 2019
22534ac
USE_TELEMETRY_SIM if (FLASH_SIZE > 256)
potater1 Mar 31, 2019
c5a1d1a
simModuleState added, checkGroundStationNumber() modified: check last…
potater1 Mar 31, 2019
ec1655d
SIM_MIN_TRANSMISSION_INTERVAL
potater1 Mar 31, 2019
2583a41
GPS fix indicator
potater1 Apr 6, 2019
dfd9d59
transmit() logic changed to use flags, and sim_transmission_interval …
potater1 Apr 6, 2019
2c7a608
detectAccEvents()
potater1 Apr 6, 2019
01711cc
lastMessageTriggeredBy
potater1 Apr 6, 2019
c88d9b7
acc event detection 2000 ms condition
potater1 Apr 8, 2019
456fbef
transmit(): low altitude check
potater1 Apr 13, 2019
9346bb1
acc event detection moved to transmit()
potater1 Apr 13, 2019
7e69366
course over ground
potater1 Apr 13, 2019
f224fd7
number checking improved
potater1 May 1, 2019
7b32a33
avg speed division by zero check
potater1 May 2, 2019
70b0e7f
GPS transmit condition: posControl.flags.estPosStatus < EST_USABLE
potater1 May 2, 2019
26d1ac2
Merge branch 'development' into sim-dev
shellixyz May 23, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/Cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -433,3 +433,8 @@ After restoring it's always a good idea to `dump` or `diff` the settings once ag
| nav_mc_braking_bank_angle | 40 | max angle that MR is allowed to bank in BOOST mode |
| osd_artificial_horizon_max_pitch | 20 | Max pitch, in degrees, for OSD artificial horizon |
| baro_cal_tolerance | 150 | Baro calibration tolerance in cm. The default should allow the noisiest baro to complete calibration [cm]. |
| sim_ground_station_number | Empty string | Number of phone that is used to communicate with SIM module. Messages / calls from other numbers are ignored. If undefined, can be set by calling or sending a message to the module. |
| sim_transmission_interval | -60 | Text message transmission interval in seconds for SIM module. Negative value means transmission is off but can be switched on by sending a "T" message. |
| acc_event_threshold_high | 0 | Acceleration threshold [cm/s/s] for impact detection text messages sent by SIM module. 0 = detection off. |
| acc_event_threshold_low | 0 | Acceleration threshold [cm/s/s] for low-g / freefall detection text messages sent by SIM module. Valid values: [0-900] |
| acc_event_threshold_neg_x | 0 | Acceleration threshold [cm/s/s] for backwards acceleration / fixed wing landing detection text messages sent by SIM module. 0 = detection off. |
1 change: 1 addition & 0 deletions make/source.mk
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ COMMON_SRC = \
telemetry/mavlink.c \
telemetry/msp_shared.c \
telemetry/smartport.c \
telemetry/sim.c \
telemetry/telemetry.c \
io/vtx.c \
io/vtx_string.c \
Expand Down
43 changes: 41 additions & 2 deletions src/main/fc/settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1463,7 +1463,7 @@ groups:

- name: PG_TELEMETRY_CONFIG
type: telemetryConfig_t
headers: ["io/serial.h", "telemetry/telemetry.h", "telemetry/frsky_d.h"]
headers: ["io/serial.h", "telemetry/telemetry.h", "telemetry/frsky_d.h", "telemetry/sim.h"]
condition: USE_TELEMETRY
members:
- name: telemetry_switch
Expand Down Expand Up @@ -1514,7 +1514,46 @@ groups:
field: ltmUpdateRate
condition: USE_TELEMETRY_LTM
table: ltm_rates

- name: sim_ground_station_number
field: simGroundStationNumber
potater1 marked this conversation as resolved.
Show resolved Hide resolved
condition: USE_TELEMETRY_SIM
type: string
max: 16
- name: sim_transmit_interval
field: simTransmitInterval
condition: USE_TELEMETRY_SIM
type: uint16_t
min: SIM_MIN_TRANSMIT_INTERVAL
max: 65535
- name: sim_transmit_flags
field: simTransmitFlags
condition: USE_TELEMETRY_SIM
type: string
max: SIM_N_TX_FLAGS
- name: acc_event_threshold_high
field: accEventThresholdHigh
condition: USE_TELEMETRY_SIM
type: uint16_t
min: 0
max: 65535
- name: acc_event_threshold_low
field: accEventThresholdLow
condition: USE_TELEMETRY_SIM
type: uint16_t
min: 0
max: 900
- name: acc_event_threshold_neg_x
field: accEventThresholdNegX
condition: USE_TELEMETRY_SIM
type: uint16_t
min: 0
max: 65535
- name: sim_low_altitude
field: simLowAltitude
condition: USE_TELEMETRY_SIM
type: int16_t
min: INT16_MIN
max: INT16_MAX
- name: PG_ELERES_CONFIG
type: eleresConfig_t
headers: ["rx/eleres.h"]
Expand Down
1 change: 1 addition & 0 deletions src/main/io/serial.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ typedef enum {
FUNCTION_DEBUG_TRACE = (1 << 15), // 32768
FUNCTION_RANGEFINDER = (1 << 16), // 65536
FUNCTION_VTX_FFPV = (1 << 17), // 131072
FUNCTION_TELEMETRY_SIM = (1 << 18) // 262144
} serialPortFunction_e;

typedef enum {
Expand Down
2 changes: 2 additions & 0 deletions src/main/target/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@

#define USE_BOOTLOG
#define BOOTLOG_DESCRIPTIONS

#define USE_TELEMETRY_SIM
#endif

#if (FLASH_SIZE > 128)
Expand Down
Loading