James Cotton
f491c924d6
Start updating the OSX UDP simulation to use a separate thread for receiving
...
but it needs two - one as a task (where the com callback occurs) and another
for the physical process stuff that doesn't need to suspend (like teh TCP
thread does)
2012-04-03 09:17:55 -05:00
James Cotton
5d0e513678
Fix small deg/rad issue in generating gps data
2012-04-03 09:17:55 -05:00
James Cotton
df6bc4deff
Enable guidance on simulation and add wind model
2012-04-03 09:16:31 -05:00
James Cotton
fdfaac6559
More tweaks to OSX simulator
2012-04-03 09:16:31 -05:00
James Cotton
ca535c2632
Fix bugs in simulated sensor data. Now works well with INSGPS.
2012-04-03 09:16:31 -05:00
James Cotton
84040d25b4
Add attitudesimulated object to capture the simulated state
2012-04-03 09:16:30 -05:00
James Cotton
09ce6e1ab4
Restore the original Revolution FreeRTOSConfig and make the osx simulation
...
scheduler not start high priority tasks when they are created because I can't
reliably get the starting task to stop (because currently in a swapping mutex I
think).
2012-04-03 09:16:30 -05:00
James Cotton
6df9691609
Bring back the original module files and remove comments from FreeRTOS
...
debugging
2012-04-03 09:16:30 -05:00
James Cotton
82a2987b2c
More improvements to the osx simulation FreeRTOS port. Only tick the tick
...
handler when we have confirmed the running thread has halted. This is more
like what would happen on a single core machine.
2012-04-03 09:16:30 -05:00
James Cotton
543500ed78
Improve the simulated sensors to produce (I think) consistent data now
2012-04-03 09:16:30 -05:00
James Cotton
0b342ea3d6
Changing the tick counter to only happen after current thread is suspended
...
seems to fix stability issues
2012-04-03 09:16:30 -05:00
James Cotton
fbd8695d7d
Check in WIP for osx simulation
2012-04-03 09:16:30 -05:00
James Cotton
c1726e30e5
Make pios_tcp uses two threads - one for the socket stuff and another within
...
FreeRTOS to receive the data.
2012-04-03 09:16:30 -05:00
James Cotton
75262b400a
More osx simulation work
2012-04-03 09:16:29 -05:00
James Cotton
da294384b6
Getting closer on osx simulation
2012-04-03 09:16:29 -05:00
James Cotton
a2bc7b8668
Osx Simulator Not running quickly but at least it's staying up
2012-04-03 09:16:29 -05:00
James Cotton
898a595d81
Delete old files
2012-04-03 09:16:29 -05:00
James Cotton
adad006530
More work on OSX simulation
2012-04-03 09:16:29 -05:00
James Cotton
99e246f151
More of the 7.0 files for OSX simulation
2012-04-03 09:16:29 -05:00
James Cotton
356802b5ac
Update to FreeRTOS 7 for OSX sim
2012-04-03 09:16:28 -05:00
James Cotton
0d3a6d94d8
Delete some old files
2012-04-03 09:16:28 -05:00
James Cotton
491df5d130
Small update to the osx wdg
2012-04-03 09:16:28 -05:00
James Cotton
51f0c3453b
More work on osx simulation engine
2012-04-03 09:16:28 -05:00
James Cotton
3c0b65fbf8
Implement a simulated watchdog to catch when the chip would have reboot
2012-04-03 09:16:28 -05:00
James Cotton
28cab678ce
Simulate a more complete QC model.
2012-04-03 09:16:28 -05:00
James Cotton
9d5dbe4bfe
Create stub for TCP connection of simulation
2012-04-03 09:16:28 -05:00
James Cotton
6aa1f1e344
Had some debugging outputs (logged to file) still enabled
2012-04-03 09:16:28 -05:00
James Cotton
f1aa3b658e
Add a new sensor simulation mode that essentially has a gyro rate that is rate
...
desired and the accel based on the current attitude.
2012-04-03 09:16:28 -05:00
James Cotton
ce54c4205d
Disable a print from the port that was causing rashes
2012-04-03 09:16:27 -05:00
James Cotton
6df2df6eec
Get rid of the mutex when enabling/disabling soft IRQs. This isn't ideal but
...
it seems to be triggering deadlocks.
2012-04-03 09:16:27 -05:00
James Cotton
6adc74f6f9
Check in the fake sensor data module
2012-04-03 09:16:27 -05:00
James Cotton
dee17f8fd4
Enable task run time monitoring in osx simulation
2012-04-03 09:16:27 -05:00
James Cotton
0e815540ff
Patch from Stac that processes module names without using sed. Also enable
...
diagnostic stuff for simulation.
2012-04-03 09:16:27 -05:00
James Cotton
2391385788
Remove the pauase in the idle task. Increases load but also stability.
2012-04-03 09:16:27 -05:00
James Cotton
e97c1bc016
Include the module include file before any uavo ones
2012-04-03 09:16:27 -05:00
James Cotton
dfa39b59bf
Rename the pios_config file for simulation
2012-04-03 09:16:26 -05:00
James Cotton
cb7b475d03
Remove the need ot have two ways of listing the modules for simulation
2012-04-03 09:16:26 -05:00
James Cotton
76bdd09795
Rename the pios_config file for simulation
2012-04-03 09:16:26 -05:00
James Cotton
e79a6e292b
Add watchdog flag for simulated sensor task
2012-04-03 09:16:26 -05:00
James Cotton
e0fbdaf9fe
Move the pios_board_posix file to something more general
2012-04-03 09:16:26 -05:00
James Cotton
c8a64ccbc7
Need to use slightly different code to generate the InitMods.c function for
...
simulation because of the Attitude/Revolution format.
2012-04-03 09:16:26 -05:00
James Cotton
1763d0c72c
Switch to conditional signaling. Seems more robust.
2012-04-03 09:16:26 -05:00
James Cotton
f0e84088c1
Simulated LED now flashing.
2012-04-03 09:16:26 -05:00
James Cotton
5589ca60db
Check in compilation files for OSX simulation. Update to work on revolution
...
tree.
2012-04-03 09:16:26 -05:00
James Cotton
ea5b733ac8
Fix the soft timing in pios_delay. Also disable LED printing messages.
2012-04-03 09:16:26 -05:00
James Cotton
dd5a71c48d
Add watchdog flag for simulated sensor task
2012-04-03 09:16:25 -05:00
James Cotton
ae2f1e95f6
Move the pios_board_posix file to something more general
2012-04-03 09:16:25 -05:00
James Cotton
5fd569829c
Need to use slightly different code to generate the InitMods.c function for
...
simulation because of the Attitude/Revolution format.
2012-04-03 09:16:25 -05:00
James Cotton
5901a07eb1
Switch to conditional signaling. Seems more robust.
2012-04-03 09:16:25 -05:00
James Cotton
99b81c7159
Simulated LED now flashing.
2012-04-03 09:16:25 -05:00
James Cotton
4e64b27034
Disable matlab simulation for now
2012-04-03 09:16:24 -05:00
James Cotton
cfd92de87a
Add explicit casts in manualcontrol to avoid compiler warnings/errors
2012-04-03 09:16:24 -05:00
James Cotton
7ba32f8735
Check in compilation files for OSX simulation. Update to work on revolution
...
tree.
2012-04-03 09:16:24 -05:00
James Cotton
5827e3f565
Add box around logo path
2012-04-03 03:42:37 -05:00
James Cotton
bfb0c6935e
Make pathplanner use callbacks on the waypoints and their index to pick up
...
changes from the GCS while flying
2012-04-03 03:42:37 -05:00
James Cotton
c26cceb47b
If the waypoint index is changed then update teh position desired. This should
...
probably be done with change callbacks because currently changing the waypoints
themselves doesn't update position desired.
2012-04-03 03:42:36 -05:00
James Cotton
6d1c36680f
Scale the max velocity as a magnitude on teh vector instead of independently on
...
each direction
2012-04-03 03:42:36 -05:00
James Cotton
5b3cc4876e
In simulations a higher GPS noise is required for the INS
2012-04-03 03:42:35 -05:00
James Cotton
32f76db8ae
Only update position desired when you change waypoints active
2012-04-03 03:42:35 -05:00
James Cotton
ba1ade33cb
Get navigation working and program hardcoded flight path
2012-04-03 03:42:34 -05:00
James Cotton
62117430cf
Flip the sign of throttle in the guidance altitude control
2012-04-03 03:42:34 -05:00
James Cotton
7f226867c6
Some bug fixes for revo attitude estimation.
2012-04-03 03:42:33 -05:00
James Cotton
d4488512c0
Add RTH waypoint action
2012-04-03 03:42:33 -05:00
James Cotton
3eac69e953
Create stub for waypoint navigation
2012-04-03 03:42:32 -05:00
James Cotton
c8ceea72e6
Increase the telemetry queue size from revolution
2012-04-03 03:42:32 -05:00
James Cotton
af9f36d7df
Improve the attitude initialization for all of the modes
2012-04-03 03:42:32 -05:00
James Cotton
3888d6ff69
Changed settings that makes updates smoother
2012-04-03 03:42:31 -05:00
James Cotton
319b53a342
Make sure full initialization routine for INSGPS occurs each time it is
...
restarted.
2012-04-03 03:42:31 -05:00
James Cotton
372f959c37
Refine some stack sizes
2012-04-03 03:42:30 -05:00
James Cotton
54880c83a0
Fix some task sizes and the memory limits
2012-04-03 03:42:30 -05:00
James Cotton
a83fb019f6
When in complimentary filter mode pass the GPS information straight
...
through to Position Actual
2012-04-03 03:42:29 -05:00
James Cotton
98b1a21921
Fixup: Shouldn't update gps until home location is set
2012-04-03 03:42:29 -05:00
James Cotton
7a3ec3e173
Some code cleanup to get rid of some warning messages
2012-04-03 03:42:29 -05:00
James Cotton
23625904c5
Remove the now unused ECEF and Rne fields from HomeLocation. Also reenable
...
calculation of the WMM and HomeLocation from the GPS code for revolution.
2012-04-03 03:42:28 -05:00
James Cotton
71d0180d45
Use the sensor variances from object
2012-04-03 03:42:28 -05:00
James Cotton
ce2d1f94f6
Better hardcoded constants for INS variances
2012-04-03 03:42:27 -05:00
James Cotton
de7fc81795
Fixes to the GPS LLA to NED translation
2012-04-03 03:42:27 -05:00
James Cotton
e32ab9342c
Shuffle some stack sizes around
2012-04-03 03:42:26 -05:00
James Cotton
4cadb7ec0e
Forgot to initialize revo settings object
2012-04-03 03:42:26 -05:00
James Cotton
337d5b7079
Enable guidance in revo. Update manual control to set the position desired
...
when the switch is flipped.
2012-04-03 03:42:25 -05:00
James Cotton
0eedaa1250
Change how we convert LLA to NED. Now it is done with a taylor expansion
...
around the home LLA coordinate to avoid the conversion into ECEF coordinates.
This has the benefit of not requiring double precision math and uses less
operations.
Now we should remove the Rne and ECEF fields from HomeLocation as they are
unused
2012-04-03 03:42:25 -05:00
James Cotton
e8cc7748af
Clean up some unused variables in attitude code
2012-04-03 03:42:24 -05:00
James Cotton
a9aa6b696b
Add object for setting the fusion algorithm
2012-04-03 03:42:24 -05:00
James Cotton
1911c7360d
New NEDPosition object which is the transformed GPS location
2012-04-03 03:42:24 -05:00
James Cotton
e3c36ac99a
Change requires for GSP updated to be set to true (wrong sign on PDOP check)
2012-04-03 03:42:23 -05:00
James Cotton
1630267324
Some small updates to 16 state INS
2012-04-03 03:42:23 -05:00
James Cotton
9e4651ab80
INS working on Revo
2012-04-03 03:42:22 -05:00
James Cotton
7e36d086de
More work on INS algorithm to force constants to single
2012-04-03 03:42:22 -05:00
James Cotton
137429d92d
More work for the simulation
2012-04-03 03:42:22 -05:00
James Cotton
96edea9d4b
Some fixes to GPS parsing
2012-04-03 03:42:21 -05:00
James Cotton
55ee568fe2
Work on the INS algorithm
2012-04-03 03:42:21 -05:00
James Cotton
7034a45e44
Force more calculations to explicitly being float
2012-04-03 03:42:20 -05:00
James Cotton
8c8224c122
Use a bigger event queue for overo logging to avoid event system warnings, and
...
add code to shortcircuit formatting a packet if it will not fit.
2012-04-03 03:42:19 -05:00
James Cotton
e82323af32
Make revolution work with the FreeRTOS queue based MPU6000 driver
2012-04-03 03:41:52 -05:00
James Cotton
bb41bc1472
Add no for DIAG_TASKS to make file to make it easier not to miss.
2012-04-03 02:07:04 -05:00
James Cotton
d7cb232315
Add MPU6000 accel range to config structure. Also put in correct values.
2012-04-03 02:07:04 -05:00
James Cotton
3346e848e0
Attitude error timeout was 2 ms when sensors at 500 Hz. Caused lots of errors
...
and overwhelmed event system.
2012-04-03 02:07:04 -05:00
James Cotton
3f22ef8c66
Slow MPU6000 on CC3D to 500 Hz
2012-04-03 02:07:04 -05:00
James Cotton
35854b35f6
MPU6000 accel value coming out twice as high as it should. Need to store scale
...
in cfg structure to fix this properly.
2012-04-03 02:07:04 -05:00
James Cotton
8032130769
Slow down gyro a bit on CC to give the CPU some breathing room. Might need to
...
come down more.
2012-04-03 02:07:03 -05:00
James Cotton
a960f3d07e
Switch the MPU6000 driver to using a FreeRTOS queue. Need to update Revo code
...
to take advantage of this.
2012-04-03 02:07:03 -05:00
James Cotton
1415728762
Get the MPU6000 CC3D working. Right now the ADC system is commented out, which
...
will break regular CC.
2012-04-03 02:07:03 -05:00
James Cotton
a0b7453580
Make the firmwareIAP variable not a global
2012-04-03 02:07:03 -05:00
Stacey Sheldon
9b33be5d65
ef: pad any gaps between the BL bank and the FW bank
...
The Entire Flash (EF) image for revo has a gap between
the end of the BL bank and the start of the FW bank.
This fills the gap with 0xFF and properly aligns the
FW image in flash.
2012-04-01 22:39:27 -04:00
Brian Webb
df0a1c2ac1
Upgraded Brian-Metadata-Mods to current next.
2012-04-01 12:25:13 -07:00
Brian Webb
496a323b7f
Fixed indentaion.
2012-03-31 07:59:44 -07:00
Stacey Sheldon
eab923fee0
revo: move fw image into 128KB sectors
...
This saves the more versatile 16KB and 64KB sectors
for other purposes.
2012-03-28 21:52:43 -04:00
Stacey Sheldon
f971fc14d5
openocd: update to latest git snapshot (f1c01333)
2012-03-27 00:53:27 -04:00
Stacey Sheldon
91cffb1809
f4 usb: don't skip yield from ISR
...
Function was returning prior to the code that might
need to yield from within the ISR.
2012-03-27 00:18:44 -04:00
Corvus Corax
0742c88a98
enabled optional rtation of Revolution board
2012-03-26 05:25:52 +02:00
Corvus Corax
d32dd0ccd4
Fixed fmod() versus fmodf() usage in flight/...
2012-03-26 04:16:54 +02:00
Stacey Sheldon
730defb698
f4 flash: fix flash voltage range setting in bl_helper
...
F4 boards are powered by 3.3V which corresponds to
VoltageRange_3. Fix this to match actual VDD so we
get faster erase/write times.
2012-03-22 22:37:31 -04:00
James Cotton
8059004755
Make sure if an event has a null handle and the queue is full we don't try and
...
query UAVObjID
2012-03-22 10:46:30 -05:00
James Cotton
c7ff2a46c7
Merge remote-tracking branch 'origin/laurent/modelview' into revolution
...
Conflicts:
flight/CopterControl/Makefile
ground/openpilotgcs/src/plugins/config/config.pro
ground/openpilotgcs/src/plugins/config/configgadgetwidget.h
2012-03-22 02:58:24 -05:00
James Cotton
2f8049e20a
Update the bootloader hw version for the mpu6000 board and make the sensor code
...
and initialization respond appropriately. Enable hte L3GD20 and BMA180.
Let the board type determine which is used.
2012-03-22 00:41:37 -05:00
James Cotton
6350ec575e
Merge remote-tracking branch 'origin/os/features/stick-deadband-next' into next
...
Conflicts:
ground/openpilotgcs/src/plugins/config/configinputwidget.cpp
2012-03-21 16:03:40 -05:00
James Cotton
e7ca02c038
Initialize mag before mpu6000. Seems more reliable but I don't know why.
2012-03-21 03:42:15 -05:00
James Cotton
e4290d678b
Reenable the pressure sensor and other modules
2012-03-21 00:49:29 -05:00
James Cotton
720684c248
Flag to enable pressure/mag
2012-03-21 00:49:04 -05:00
James Cotton
a77a859e5c
Using some config switches to get this board up and running
2012-03-21 00:48:31 -05:00
James Cotton
6b88a278b3
Disable overosync by default. It was triggering event system warnings due to
...
the extra updates from altholdsmoothed. Increase queue size when reenabled.
Also AltHold is is trigger warnings because other tasks starve it during
startup.
2012-03-21 00:29:09 -05:00
James Cotton
f4663b98e4
When the event system or object manager has an error store the object ID in the
...
SystemStats.
2012-03-20 23:18:07 -05:00
Brian Webb
aba3789d87
Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into Brian-Metadata-Mods
2012-03-18 13:28:11 -07:00
James Cotton
a319a6b14c
Flags to disable mag/baro init
2012-03-14 22:35:09 -05:00
James Cotton
0d42303d37
Fix some compilation errors/warnings in attitude.c
2012-03-11 16:30:18 -05:00
James Cotton
c8d1534b87
Convert inline functions to static, let the compiler figure it out. Also some
...
formatting since code was probably written with tabstop = 2 :)
2012-03-11 13:18:08 -05:00
James Cotton
bbbca319d8
Merge commit 'c4df0c0ceff8ba985bb20d815f27910b9e59d992' into revolution
2012-03-11 13:14:06 -05:00
Alessio Morale
c4df0c0cef
Support for port remapping on serial ports
...
Support for receiver configuration (PPM, PWM and DSM)
There are still problems with Flexi port (not sure if related to a problem with my board) and Uart/SBUS that has the input always inverted.
2012-03-11 18:38:49 +01:00
Stacey Sheldon
3782cdc58e
bu: drop CC and PipX from BU targets since they don't build
...
The CC and PipX bootloader updater (BU) builds don't currently
work due to some recent changes in how LEDs are handled.
Remove them from the default BU targets so that the all_flight
target can build clean again.
Also fix a linker warning in OP build.
2012-03-10 20:41:15 -05:00
Stacey Sheldon
6038bfcb40
revo servo: swap servo pins 3 and 4 definitions to match schematic
...
Note non-standard pin numbering on JP3 on the schematic.
2012-03-10 15:06:21 -05:00
James Cotton
820ca6a970
Initialize loop variable OUTSIDE loop so that baro is used still for altitude
...
hold.
2012-03-10 11:28:51 -06:00
James Cotton
f4705551b6
Update task info to cover the AltitudeHold module
2012-03-10 11:14:30 -06:00
James Cotton
690f1b5f29
Enable camera stabilization
2012-03-08 01:37:34 -06:00
Stacey Sheldon
3210bd3f9c
f4 usb_dcd: disable FIFO empty IRQ while waiting for tx completion
...
CPU was being hammered with FIFO empty IRQs if we queued data but
the host wasn't actively draining the FIFO.
This was entirely unexpected so this hack should probably be
removed once we can figure out why this was happening.
This is almost certainly hiding some other issue.
2012-03-07 20:36:37 -05:00
Stacey Sheldon
c4bd286739
f4 usb_hid: track whether we have buffers queued on endpoints
...
Make sure we don't clobber our endpoint configuration by
double configuring an Rx or Tx buffer against it. Wait for
the completion of the previous operation before allowing
endpoint configuration again.
2012-03-07 20:36:36 -05:00
Stacey Sheldon
65fc6104e6
f4 usb_hid: ignore upper layers if USB IF not yet enabled
...
Upper (COM) layer was calling down into the HID layer before
the HID interface had been enabled. This was leading to
interacting with the endpoint Rx and Tx FIFOs prior to init.
The FIFO config was then being clobbered when we the USB IF
was eventually enabled.
2012-03-07 20:01:35 -05:00
Stacey Sheldon
1f37806eab
f4 usb_hid: fix typo in EP IN registration call
...
Code was using the size of the Rx buffer instead of the Tx
buffer when registering. Buffers are currently the same
size so wasn't causing any issues.
2012-03-07 20:01:35 -05:00
Stacey Sheldon
bc3ee6209c
f4 usbhook: drop in/out bit from EP numbers before using as index
...
USBHOOK endpoint callback arrays should not be indexed with the
0x80 (in/out) bit set. Oops.
2012-03-07 20:01:35 -05:00
Stacey Sheldon
6832a62872
f4 bl_helper: clear all flash errors as we unlock the flash
...
Error flags being set were causing flash erase operations to
fail. Not sure why these flags were set though so this might
be hiding some other problem.
2012-03-07 19:53:18 -05:00
Stacey Sheldon
4ea1156e7b
f4 bl_helper: teach bl_helper about f4 flash sector map
2012-03-07 19:53:17 -05:00
Stacey Sheldon
d1d123e4f6
revo bl: turn on USB and add support for OP DFU protocol
2012-03-07 19:53:17 -05:00
Stacey Sheldon
b8fcbad297
revo bl: remove unneeded code from revo BL
...
Clean up BL source tree and makefile.
2012-03-07 19:53:17 -05:00
Stacey Sheldon
c854c3f4a4
usbhook: add support in API for deactivating USB
2012-03-07 19:53:17 -05:00
Stacey Sheldon
cb9c3a9b7e
usbhook: delete dead code
...
Remove old code left-over from porting from F1 to F4.
2012-03-07 19:53:17 -05:00
Stacey Sheldon
e2ab662b5d
sysclk: pass in correct definition for HSE_VALUE
...
The code in RCC_GetClocksFreq() uses HSE_VALUE to determine
the tick rate of the SYSCLK. This in turn is used by the
code in PIOS_DELAY_* to compute delays.
ST Library defaults this to 25MHz for the F4. Our board
actually has an 8MHz oscillator so delays were way off.
Mostly affects the bootloaders since most FW code uses RTOS
delays rather than busy-waiting using PIOS_DELAY_*.
2012-03-07 19:52:54 -05:00
Stacey Sheldon
fdf54ab86c
hid: fix response to HID descriptor
...
HID driver was incorrectly giving back the HID interface
descriptor when asked for the HID descriptor. This should
let OP boards interact better with generic HID layer drivers
and also gives us nicer output in lsusb once the HID descriptor
is read.
2012-03-07 19:52:54 -05:00
James Cotton
61d59828dc
Disable the new features if not revolution and set an error flag. Fixes
...
compilation errors.
2012-03-05 00:24:11 -06:00
Alessio Morale
637af911ef
Merge remote-tracking branch 'origin/james/revolution' into amorale/revolution
2012-03-04 12:31:13 +01:00
James Cotton
7961aba83c
Clean up a few more compiler warnings
...
Conflicts:
flight/PiOS/Common/pios_ms5611.c
2012-03-03 13:32:56 -06:00
James Cotton
91a226fc12
Sometimes the mag stops updating so kickstart it
2012-03-03 13:31:46 -06:00