11480 Commits

Author SHA1 Message Date
Daniel Agar
76a6cd10b1 delete unnecessary drv_gps.h 2018-11-06 07:43:43 +08:00
Daniel Agar
571364c617 delete baro_report (alias for sensor_baro_s) 2018-11-06 07:43:43 +08:00
Daniel Agar
85c2b6307c delete unused IOCTL AIRSPEEDIOCGSCALE 2018-11-06 07:43:43 +08:00
Daniel Agar
acc24da0c2 delete gyro_report (alias for sensor_gyro_s) 2018-11-06 07:43:43 +08:00
Daniel Agar
aaf1667b09 delete unused GYRO_SAMPLERATE_DEFAULT 2018-11-06 07:43:43 +08:00
Daniel Agar
3daf37433e delete unused IOCTL GYROIOCSSAMPLERATE 2018-11-06 07:43:43 +08:00
Daniel Agar
60c14fe8f1 delete unused IOCTL GYROIOCGSAMPLERATE 2018-11-06 07:43:43 +08:00
Daniel Agar
ef65e5267a delete unused IOCTL GYROIOCGRANGE 2018-11-06 07:43:43 +08:00
Daniel Agar
068dcb37df delete unused IOCTL GYROIOCSRANGE 2018-11-06 07:43:43 +08:00
Daniel Agar
aaf0b6fb5c delete unused IOCTL GYROIOCGSCALE 2018-11-06 07:43:43 +08:00
Daniel Agar
2a83a40491 delete accel_report (alias for sensor_accel_s) 2018-11-06 07:43:43 +08:00
Daniel Agar
e759e0e1a5 delete unused IOCTLs ACCELIOCSSAMPLERATE and ACCEL_SAMPLERATE_DEFAULT 2018-11-06 07:43:43 +08:00
Daniel Agar
77abcab46f delete unused IOCTL ACCELIOCGRANGE 2018-11-06 07:43:43 +08:00
Daniel Agar
5d3d120705 delete unused IOCTL ACCELIOCSRANGE 2018-11-06 07:43:43 +08:00
Daniel Agar
b0c3e12139 delete unused IOCTL ACCELIOCGSCALE 2018-11-06 07:43:43 +08:00
Daniel Agar
8ad59160c9 delete unused IOCTL ACCELIOCGSAMPLERATE 2018-11-06 07:43:43 +08:00
Daniel Agar
f59f0d4b2d delete unused IOCTL SENSOR_POLLRATE_EXTERNAL 2018-11-06 07:43:43 +08:00
Dennis Mannhart
3b92d49b64 replace + with && 2018-11-05 21:54:19 +01:00
Dennis Mannhart
6a0a9c92fb PositionControl:
- set integral states and setpoint of reference state to 0
- set thrust to NAN if it will be computed from position and velocity control
2018-11-05 21:54:19 +01:00
Thunder
662c206ceb fix ControlMath.cpp mathematical derivation error (#10796) 2018-11-01 10:13:59 -04:00
Julian Oes
428c2f72bd mavlink: always acknowledge a param write
This change has two effects:
1. We always acknowledge a param write no matter if the value was
   actually changed or not. This is according to the spec:
   https://mavlink.io/en/services/parameter.html#write-parameters
2. This fixes the bug where int32 parameters were not actually acked
   because the memory of the param value was casted directly to float
   and then compared. In the case of a int32 parameter set from 0 to 1
   it would mean that the cast to float of the memory representation
   was still 0 and therefore it was assumed to be "no change" and the
   ack was omitted.
2018-11-01 00:06:22 +01:00
Beat Küng
bec43b0b28 mc_att_control: run rate controller first and increase fmu prio by one
The rate controller is now run directly after a gyro publication, and
as soon as it publishes the actuator controls, the output driver (fmu/...)
runs.

Test on a Pixracer:
Reduces fmu control latency from 219us to 134us.
If we run the rate controller last (same order as before, just increase
the prio), the latency is 201us.

CPU load is unchanged.

The drawback is that the attitude to rate setpoint generation is delayed
by one cycle (4ms), but it will be reduced to 1ms as soon as we run at
1kHz.
2018-10-30 20:20:25 -04:00
Beat Küng
95cc6a06f3 mc_att_control: separate attitude controller from rate controller update
This will allow to run the rate controller faster than the attitude
controller.
2018-10-30 20:20:25 -04:00
Beat Küng
fc997dd0d5 mc_att_control: reduce minimum required dt
2ms is not enough to run at 1kHz
2018-10-30 20:20:25 -04:00
Beat Küng
d552c2a362 refactor mc_att_control: move publications into separate methods
improves readability & reduces duplicated code
2018-10-30 20:20:25 -04:00
Hamish Willee
44f650fdc9 Add additional info to FW_LND_USETER (#10777) 2018-10-30 10:14:52 -04:00
Lukas Woodtli
a7d297ed57 Fix division by zero and cast of to big floats to int 2018-10-28 16:54:36 +01:00
Lukas Woodtli
6caf0d114d Fix division by zero and cast of too big floats to int 2018-10-28 16:54:36 +01:00
Mara Bos
10c20b38ad Fix many format strings.
Fixes these invalid format strings:
- A `%d` for a pointer (replaced it by `%p`)
- A 0x%08x (and a 0x%0x8!) for a pointer (replaced by %p)
- 2 cases of `%d` for a `ssize_t` (replaced it by `%zi`)
- 1 case of a %u for an `int` (replaced by %i)
- 3 cases of %d for a `long` (replaced by %ld)
- 19 cases of `%d`, `%i`, `%u` or `%lu` for a `size_t` (replaced it by `%zu`)
- An unused formatting argument (removed it)
- A missing `%d` (added it)
- A missing `%s` (added it)
- 2 cases of `%llu` for a `uint64_t` (replaced it by `"%" PRIu64`)
- 6 cases of giving a string directly as format string (replaced it by `("%s", string)`)
- 2 cases of %*-s, which should probably have been %-*s.
  (Looks like NuttX accepts (the invalid) %*-s, but other platforms don't.)
- A %04x for a `uint32_t` (replaced by "%04" PRIx32)
2018-10-27 12:44:51 +02:00
Beat Küng
86673ecfcb navigator: remove dependency on vtol module by using the C param API
This is the quickest way to achieve the desired result.
Long-term we might do something else.
2018-10-26 08:02:42 +02:00
Beat Küng
ee5c18a737 SDLOG_MISSION param: update description 2018-10-26 08:02:42 +02:00
Beat Küng
c5d8abff00 log_writer_file: rename argument to avoid shadowing warning 2018-10-26 08:02:42 +02:00
Beat Küng
2642915a76 logger: enable mission log by default
To get it field-tested. This can be reverted for a release...
2018-10-26 08:02:42 +02:00
Beat Küng
3a462c2ba7 refactor logger: move debug buffer printf into separate method (DBGPRINT) 2018-10-26 08:02:42 +02:00
Beat Küng
234ec7f2a2 logger: add mission log to frontend, configurable via SDLOG_MISSION
- mission logs are stored in a separate directory mission_log
- It's disabled by default
- Does not increase RAM usage if disabled (if enabled, only 300 bytes)
- Log rotate does not apply to the mission logs
2018-10-26 08:02:42 +02:00
Beat Küng
4fc1c5c4f5 LogWriterFile: split long header messages that exceed the buffer length
Some message formats are longer than the 300 bytes. We can split the writes
because we have to wait until they are written anyway.
2018-10-26 08:02:42 +02:00
Beat Küng
28ac7679e0 logger: change message id from uint16_t to uint8_t
256 subscriptions are enough for now.
Reduces RAM usage by 300 bytes.
2018-10-26 08:02:42 +02:00
Beat Küng
d6e820fe67 logger: add mission file to LogWriterFile backend
Not used yet, it should not affect anything, except for slight RAM
increase.
2018-10-26 08:02:42 +02:00
Beat Küng
b86c7d2e8f Logger: only write subscribed topic format definitions
Previously the formats of all known uorb messages were written.

- reduces header size by about 13KB
- reduce ulog_message_format_s size to reduce required stack size.
  Largest message format is about 1000 bytes.
2018-10-26 08:02:42 +02:00
Beat Küng
0745ba9052 refactor logger: move some code inside run() into separate methods 2018-10-26 08:02:42 +02:00
Beat Küng
5eafa1b34b refactor logger: move some independent methods into separate util file 2018-10-26 08:02:42 +02:00
Beat Küng
b65871b433 fix reposition: set acceptance radius
Previously the acceptance radius was 0, so the FlightTaskAutoLine was
randomly changing yaw and sometimes going into a random direction.
There is still something else wrong in there, but avoids the reposition
problem.
2018-10-25 17:05:27 +02:00
CarlOlsson
d0c69efff9 gpio_led: fixed typo 2018-10-22 09:26:06 -04:00
CarlOlsson
db4d79358a commander: fix typo 2018-10-22 09:26:06 -04:00
CarlOlsson
b85710b194 ekf2: fix typo 2018-10-22 09:26:06 -04:00
CarlOlsson
02a3528f24 commander: fix typo 2018-10-22 09:26:06 -04:00
CarlOlsson
c826140c2b commander: update comment to make post takeoff ekf quality test logic more clear 2018-10-22 09:26:06 -04:00
CarlOlsson
cd382d8874 voted_sensors_update: fix typo 2018-10-22 09:26:06 -04:00
CarlOlsson
7b0e0de43c ekf2: fix typo 2018-10-22 09:26:06 -04:00
CarlOlsson
6647471238 ekf2: increase maximum of EKF2_MAG_YAWLIM. This is needed on some fw platforms
in order to not constantly switch mag fusion mode in gusty winds.
2018-10-22 09:26:06 -04:00