zedamota
002c746076
OP-21/Bootloader deleted old one, commited new one. Partly functional, but slow due to current packet size.
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1378 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-22 19:51:55 +00:00
peabody124
2e705e6836
OP-116 AHRS: Made data going to the AHRS in NED format. Once the final estimate object is created I'll repeat the same calculation to populate it, although we want to avoid going back to LLA format on the OP because the CPU requirements are excessive.
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1376 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-22 19:01:36 +00:00
zedamota
6adc834d9b
OP-21/Flight Prep work for the USB HID bootloader
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1375 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-22 18:57:29 +00:00
zedamota
2daa229a2d
OP-21/Flight Prep work for the USB HID bootloader
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1374 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-22 18:56:00 +00:00
zedamota
b0d1d0dd09
OP-21/Flight Prep work for the USB HID bootloader
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1373 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-22 18:54:57 +00:00
peabody124
60332efec0
OP-118 AHRS: Missed the auto generated files for the default values. Also no idea why last patch changed navigationsettings - either make uavobjects does differently on different platforms or someone forgot to run make uavobjects.
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1372 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-22 17:02:12 +00:00
peabody124
0862d64b8c
OP-118 AHRS: Made default calibration values friendly for people. Also fixed bug that would repeatedly trigger calibration when it was requested.
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1371 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-22 16:43:00 +00:00
sambas
7859a130e8
Fixed bug that caused Object Browser to crash
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1369 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-22 08:59:18 +00:00
pip
78868216ca
Fixed UART-1 structure definition error (pios_usart_cfg pios_usart_serial_cfg)
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1368 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-22 08:59:00 +00:00
cwabbott
e27adf700b
Fix posix and win32 makefiles for recent UAVObject changes.
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1367 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-22 00:59:12 +00:00
peabody124
5662d85c4e
OP-120 AHRS: Tightened up the communication protocol so it runs more quickly. Looks ok in gdb but GCS not crashing right now (rendering error) so I can't test it properly.
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1366 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-22 00:21:54 +00:00
corvus
9bb085b7fc
Documentation: Added Flowchart for HiTL mode
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1365 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-21 23:05:12 +00:00
peabody124
8897c441fa
OP-118 AHRS: Added AHRSCalibration object and messages associated with that to AHRS. Also made AHRS run calibration only when requested. We will create a GCS plugin that runs through computing the calibration settings. To compute the variances on the AHRS set the measure variances to true, wait ten seconds, then set it to false to read it back.
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1363 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-21 21:46:02 +00:00
patrick
564a68e825
PipBee: Updating project files to fix compile errors. Routine just toggles each LED successively. There is a known error when enabling the PIOS_COM_Init(); or more specifically PIOS_USART_Init(); which blocks at some point when called. This may be due to the pios_board.c defines which I will check later today.
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1361 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-21 20:01:37 +00:00
pip
227b389e99
Attempt 2 - trying to get LEDs to flash
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1359 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-21 18:14:18 +00:00
pip
519ce846ee
Just trying to get a simple 'Hello World' program going (LED flashing)
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1358 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-21 17:14:34 +00:00
stac
b36d251bd9
ahrs: remove debug code in attitude handler
...
Debug code was previously using the q4 element
in the attitude message to encode a cycle counter
to measure performance on the AHRS. This is no
longer valid.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1357 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-21 16:23:14 +00:00
stac
26e257d340
spi: slow down OP <-> AHRS spi link
...
Issues have been reported with CRC errors
on the SPI link between the OP and AHRS
boards. Slowing the link down eliminates
the errors in my testing.
If we speed this link back up in the future,
further investigation will be required to
diagnose the source of the CRC errors.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1356 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-21 16:19:20 +00:00
stac
635df28c34
GPSPosition: Add new UAVObject for GPSPosition
...
This object is not yet populated or used. This
will soon hold the raw position data from the GPS
receiver. PositionActual will be converted to
hold the computed position from the AHRS.
Contents of this object are still subject to change.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1355 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-21 16:19:18 +00:00
stac
7f85143bd2
OPModule: updated GPSPosition object
...
Updated GPSPosition module to reflect the planned use
of a fixed a fixed point encoding for lat/lon.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1354 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-21 16:19:16 +00:00
stac
f388deef34
hmc5843: standardize line endings
...
This file had mixed line endings. Now they're all the same.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1353 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-21 16:19:14 +00:00
stac
a960d6e1b1
GPS: fix typo desimal->decimal throughout
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1352 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-21 16:19:12 +00:00
stac
7b2111e512
baroaltitude: rename AltitudeActual to BaroAltitude
...
This is to align the object names to matches the UAVObject
architecture doc. No functional changes.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1351 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-21 16:19:10 +00:00
stac
47c36b3da0
i2c: fix error in FSM for restarted reads
...
The transition from the ADDR state to the read state
was broken for non-final reads. The FSM diagram was
also wrong for this transition.
Since reads are always the last transaction in a sequence
in our current usage, this doesn't actually fix any known
bugs.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1350 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-21 16:19:06 +00:00
stac
98822bff98
i2c: force bus free on warm starts
...
Since the i2c bus is bidirectional, there are certain
states (eg. part way through a read) where the slave
device is in control of driving the SDA line.
On a cold start (power on), the slave devices are all
quiescent and will not drive the bus. However, on a warm
start (eg. watchdog or jtag restart), it is possible that as
the CPU boots, the slave device may be holding the SDA line
low. This is a bus busy condition and will prevent the I2C
bus master in the CPU from being able to seize the bus during
init.
The fix for this is to clock the i2c bus sufficiently to ensure
that the the slave device finishes its transaction and releases
the bus.
Once the slave has released the bus, the bus master can properly
initialize and assert a STOP condition on the bus.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1349 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-21 16:19:02 +00:00
peabody124
ba4dc14cea
OP-124 Flight: Added fields to the AHRSStatus to track failures of each of the SPI message types.
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1347 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-21 09:21:39 +00:00
peabody124
bb79ba66fa
OP-119 AHRS: Converted the big data structures for the WMM calculation to be allocated on the stack, which forced a dependency on FreeRTOS :-( but keeps things on the heap. Also changed the HomeLocation object to include a Set field. When this is false, OP will try and update it whenever it gets a 3D fix. If it is saved to disk with this field as true, then it won't need to get a lock to send the magnetic flux vector to the AHRS.
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1346 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-21 08:35:44 +00:00
peabody124
4b0a0236d8
OP-119 AHRS: Increased GPS stack size to allow WWM to not overwrite other memory. In addition converted all the calls to use pointers so I will switch to using pvPortMalloc vPortFree to get it off the stack entirely. Now correctly computing flux for me and running.
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1345 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-21 08:35:41 +00:00
peabody124
2031cfe4d0
OP-119 AHRS: Added error counters for the messages as well as changed an error on AHRS echo back for the HomeLocation message.
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1344 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-20 22:52:13 +00:00
peabody124
86766ecc14
OP-119 AHRS: Removed WMM computation for now because it was triggering a reset (probably not watchdog) which is weird - it worked on AHRS. Maybe running out of memory? Also added the break on comm error in ahrs_comms to resync with it. I think the message to send the home location is also not working right now. Fixed chip reset.
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1340 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-20 14:48:02 +00:00
peabody124
ef0b307353
[OP-119] Flight/AHRS: Created a HomeLocation object which is updated when the GPS gets an initial 3D fix and populated with the information to convert from LLA from the GPS to NED reference frame. Also added a message for passing the MagneticNorth vector to the AHRS and removed that computation from AHRS.
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1337 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-19 20:38:27 +00:00
FredericG
fd986f3437
OP-90 Configuring the ET OSD without eLogger. The module can now read a opaque config-file from the SD-card card and send it to the OSD
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1336 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-19 17:32:18 +00:00
peabody124
3c4def13cc
AHRS: Added message to pass GPS information into AHRS from OP. This is then converted
...
into NED reference frame and used in the INSGPS algorithm, although currently this
information isn't propagated back to OP. Data structures related to the GPS position
into the algorithm and the position estimate out will likely be in flux.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1334 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-19 05:18:34 +00:00
peabody124
8bcff21184
Flight: Made the actuator module perform a get after set to allow configuration module to override servo position.
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1329 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-18 20:47:36 +00:00
FredericG
0b9079e277
ET OSD: removed existing debug and config code
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1327 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-18 19:15:43 +00:00
peabody124
cfd20922cd
AHRS: Added the filtered data to the attitude raw object. Even though this seems like an oxymoron it's still raw to the EKF algorithm, and nice to see the real values after filtering to make sure nothing weird is going on. However, if people don't like this I'm open to suggestions/patches. I'd maybe suggest the whole attituderaw object be converted to ahrsraw anyway since it's more like that (eg. none of the values are actually attitude estimates).
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1325 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-18 14:54:24 +00:00
peabody124
fda6fc8371
Merge branch 'mac_support'
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1324 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-18 14:29:53 +00:00
peabody124
450cf07a89
AHRS: Keeping magnetometer I2C address consistent with change to I2C driver.
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1323 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-18 13:54:15 +00:00
FredericG
b46bc68e96
"addr" field of I2C transaction struct now takes real I2C address, and not address that is pre-shifted to accommodate the R/W bit
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1321 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-18 10:04:55 +00:00
FredericG
be2f5bbf70
ET OSD: Adapt to new I2C API
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1316 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-18 09:31:54 +00:00
peabody124
4cba4929c2
AHRS: Fixed another bug in decimation code - I stupidly used Matlab 1 based indexing. Adjusted timing of AHRS so it can process all the data and doesn't miss updates. Finally adjust all inputs to INS to have correct sign and orientation (I think). This is X is forward, Y is right, and Z is down which is mentioned in the forum as our standard and fits the algorithm. The magnetic sensor driver should be modified to return in this order (currently reads X,Y,Z registers which maps to left, back, up) but maybe since it's a board dependent orientation it's better where it is.
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1315 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-18 05:47:44 +00:00
dschin
9ae9c87574
Six point sensor cal for accels and/or mags
...
Uploaded here for now - belongs in GCS probably.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1310 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-17 19:02:07 +00:00
peabody124
64bcebb87a
AHRS: Fixed bug in the downsampling code (used a += a + blah, dumb). Also added initialization of the magnetic flux based on fixed GPS settings (I hope you're near Houston). I will add the GPS communication shortly.
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1307 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-17 05:32:07 +00:00
dschin
ae18a8e89c
Added general functions for coordinate conversions
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1306 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-17 00:09:32 +00:00
dschin
4f31bfbef7
Fixes for the project files. Hopefully they don't break someone else.
...
Eclipse Workspace:
- Made project in Eclipse workspace point to trunk/flight
- Re imported launch configurations from previous version
OpenOCD
- added "ft2232_device_desc "Dual RS232-HS"" back to jtag cfg files because windows didn't like it w/o it.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1305 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-16 23:40:27 +00:00
peabody124
f74268b5e5
Cleanup and documentation.
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1304 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-16 16:58:24 +00:00
peabody124
a23f3c66f4
Behaving reasonably, added calibration code which runs by default on startup and take 6 seconds - this will be called from GCS in future and saved to SD card.
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1303 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-16 16:58:22 +00:00
peabody124
e0d63103ec
Added a testing function for INS - currently doesn't stabilize for fixed inputs. Fixed two bugs I found in INSGPS (R[10] instead of R[9] initialized and Nav.Pos[2] was set to wrong X element).
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1302 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-16 16:58:20 +00:00
peabody124
d2e234b53a
Adding the code from Dr. Dale to the AHRS. Currently diverges though, but not on the PC.
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1301 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-16 16:58:18 +00:00
peabody124
ddbd4f8c80
Simple attitude calculation based on gravity and magnetic vector
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1298 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-15 06:03:44 +00:00
peabody124
3f408ad655
AHRS: Changing AHRS to use a DMA double buffering scheme with continuous samping for the analog data, then a simple fixed point FIR/decimate function. Currently all the oversampling parameters are hard coded as definitions, but will be updated to be configurable via settings.
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1297 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-15 04:09:01 +00:00
peabody124
cc2441d41b
Adding ADC downsampling code
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1296 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-15 04:08:57 +00:00
peabody124
ed70cb4794
[AHRS] Missed a setting for the ADC configuration.
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1292 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-15 01:12:00 +00:00
stac
3125ecfc4e
AHRSComms: altitude sensor data is now sent to AHRS
...
Altitude/pressure sensor data is sent to the AHRS whenever
the AltitudeActual object is updated.
Altitude, Pressure and Temperature are sent as floats.
Same as in the UAVObject that goes to the GCS.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1291 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-15 01:02:13 +00:00
peabody124
d4c5dba234
[PIOS] The ADC mappings are strange because of the way the DMA engine works. Basically data is packed 16 bits ADC2 then 16 bits ADC1 channels, so the accels are pins [4 2 0] currently. Also there is inconsistency between the names of the pins in the config file which uses 1 based indexing and the index for PIOS_ADC_PinGet which is zero based and has to account for this interleaving. Probably should adjust config file to be zero based and then to make those pin numbers map to the function call. The actual order they appear is arbitrary as the ADC engine can scan in whatever order.
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1290 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-15 00:53:30 +00:00
stac
c3e509c2cb
attituderaw: Replace HeadingActual with AttitudeRaw
...
AttitudeRaw now includes:
- magnetometers XYZ (in mG)
- gyros XYZ (raw ADC samples)
- accelerometers XYZ (raw ADC samples)
- placeholder for gyro temp sensors (read as zero for now)
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1289 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-14 23:42:14 +00:00
stac
5d635d4233
uavobjects: regenerate existing uavobjects
...
No functional change, uavobjects were not regenerated since last
change to the object generator.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1288 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-14 23:42:07 +00:00
vassilis
a075eafb98
FlightArchitecture: Updated description of Stabilization module (air/ground speed handled by guidance module)
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1285 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-14 14:19:33 +00:00
vassilis
9cd76fbe46
FlightArchitecture: Added Climbrate and Airspeed fields in Position objects
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1284 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-14 14:04:28 +00:00
vassilis
697b3510fb
Flight: First release of module architecture and dataflow diagram (still work in progress)
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1283 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-14 03:02:21 +00:00
peabody124
a084d21804
Merge branch 'watchdog'
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1281 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-13 05:18:17 +00:00
cwabbott
c1cf1ec71b
PiOS/Win32: Most stable version of port.c so far. Changed Makefile.win32 to use mingw32-gcc to avoid conflicts.
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1278 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-12 14:32:52 +00:00
dschin
487b61473e
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1268 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-11 16:18:24 +00:00
cwabbott
1125311083
Fix Eclipse project files.
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1252 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-09 18:24:26 +00:00
cwabbott
f041569bfe
fixed a small problem in port.c, also added some debug statements.
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1246 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-08 18:38:03 +00:00
stac
f74c6ffdd5
i2c: rewrite i2c layer
...
The STM32 I2C block has a number of errata associated with it.
These errata are primarily related to timing sensitivities between
the peripheral and the interrupt handler. In particular, the
correct generation of the stop bit relies on the I2C IRQ running
immediately and not being held off for any reason.
NOTE: The I2C interrupts must be the highest priority IRQs in the
system to ensure correct operation.
I2C protocol is now implemented as a formal state machine.
See: stm32_i2c_fsm.{dot,jpg} for FSM description.
I2C init is now expressed by const initializers in pios_board.c
for both OP and AHRS boards.
I2C device drivers (ie. bmp085/hmc5843) now pass in const arrays
of an unlimited number of bus transfers to be done atomically.
The I2C adapter driver now handles all bus-level locking across the
list of transactions. Generation of start/restart/stop conditions
are handled automatically over the list of transactions.
Timeouts have been removed from the API for now. May be added
back later.
This driver has run error free on both the OP and AHRS boards for
up to 48hrs but it still sometimes fails earlier than that on the OP
board. There is another possible set of improvements to the driver
that could employ the DMA engine for transfers of >= 2bytes. This
change would reduce the timing sensitivities between the peripheral
and the driver but unfortunately, both the SPI and I2C interfaces
share the DMA1 engine. That means only one of these two peripherals
can use the DMA engine and right now, SPI between OP and AHRS is
already using it.
Failures are currently fatal and will lock up the CPU. This allows
useful information to be obtained in the failure cases.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1241 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-08 04:15:08 +00:00
stac
b6c1f43145
i2c: Change API to allow passing const config data
...
Mark the I2C_InitStruct parameter as const so that we can pass
const data as the initializer.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1240 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-08 04:14:58 +00:00
stac
f66e2cbd86
battery: fix doxygen header info
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1239 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-08 04:14:56 +00:00
stac
9050b9d26a
ahrs_fsm: minor style fixups
...
No functional changes.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1238 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-08 04:14:55 +00:00
stac
a320a3e4d4
build: Turn modules back on
...
The modules were disabled for some reason in r1172.
This just turns them back on for the real targets.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1237 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-08 04:14:53 +00:00
stac
d7856b3d0a
gdb: Do not automatically reset target in gdb init file
...
The gdb init files would previously reset the target immediately
when gdb started up. This is sometimes an unpleasant side-effect
of running gdb.
In order to connect to the target, use the new "connect" function.
To reset the target use "mon reset".
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1236 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-08 04:14:52 +00:00
zedamota
a688b95eb6
Flight firmware-Start of the new bootloader
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1235 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-08 00:14:22 +00:00
dankers
297985c2a0
Move old bootloader to bootloader.old
...
This should be removed at some point but can wait till we have a working bootloader.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1234 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-07 23:55:28 +00:00
cwabbott
6f553efe45
debug_printf() for PiOS.win32. There are still many issues :(.
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1226 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-07 02:30:35 +00:00
peabody124
0fdfbb2ffb
Deleting old USB code that I meant to delete a while ago. Also changed names of some functions to OP. Finally fixed the USB taking over PIOS telemetry. Detects the USB cable and that the configuration has been taken by the USB bus.
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1217 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-05 23:43:52 +00:00
peabody124
0eac218572
Small update to make ManualControl get the command after setting it. That way if the flight system isn't meant to overwrite it (i.e. flying via GCS) it uses the right value. I think this should actually be the default behavior of UAVObject set... awaiting feedback from Vassilis.
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1214 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-05 19:56:36 +00:00
pip
611aee73ad
Removed I2C support from PipBee as it's not used. Added 4 LED definitions.
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1208 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-04 17:35:48 +00:00
pip
0331f05e9a
Added extra LED's .. now up to 4 LED's .. (PipBee has 4 controllable LED's)
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1207 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-04 17:32:42 +00:00
cwabbott
d910b8f756
slight changes to get PiOS.win32 to compile
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1205 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-04 14:21:58 +00:00
dankers
1a0f2e81e8
Foundations for PipBee modem code.
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1203 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-04 09:37:09 +00:00
cwabbott
c2508bbb9e
PiOS for win32
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1200 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-03 19:29:14 +00:00
dankers
a3c1bbfc95
Remove no longer needed SDCard Files
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1190 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-01 14:00:09 +00:00
sambas
7f6336d324
OP-22 Flight/PiOS: Spektrum reworked, input is mapped to old aux in receiver connector, works nicely with calibration plugin. Also bind works, just needs config flag to bind on powerup
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1189 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-01 10:34:07 +00:00
peabody124
47da7326e7
Damn thought I'd commited this
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1176 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-29 13:50:24 +00:00
peabody124
23ed7c8435
Removing the device_desc line since it seems to advertise differenetly across platforms and openocd doesn't require it. Please revert this change if it starts block other OS but I don't think it will
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1175 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-28 21:29:27 +00:00
peabody124
7e6afe5a75
Updated HID code to do packet processing in OS indepdent layer. Should now work on all platforms. Please test and get back to me. Maximum object size of 62 bytes currently.
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1174 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-28 18:55:04 +00:00
corvus
02a78f0470
moved Vassilis stabilization module as of r1153 into Stabilization/simple
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1173 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-28 15:03:55 +00:00
corvus
9ad9ffd466
moved new stabilization code into experimental subdirectory
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1172 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-28 15:00:51 +00:00
corvus
c8486d08e4
Fixed some bugs in OpenPilot Core.
...
- syntax error in pios_board_posix.c introduced with Doxygen comment blocks
- platform dependant code had been added to openpilot.c instead of pios_board.c
- redundant header inclusion (stm32... already included by PiOS)
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1171 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-28 14:34:48 +00:00
dankers
32e6d53b23
Small comment issue that was causing build to fail
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1170 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-28 11:28:18 +00:00
edouard
9145a4b1a6
Doxygen work: created "OpenPilot System" group for system libraries and core files. Changed a typo on the Osd Doxygen. Let me know if you're OK with this approach.
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1169 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-28 07:28:21 +00:00
peabody124
6f63c10dca
Removing more debugging comments
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1168 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-27 23:48:12 +00:00
peabody124
3144e3157c
Added back checks on USB cable so falls back to serial telemetry if not plugged in
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1167 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-27 23:11:28 +00:00
peabody124
27bcd20882
HID working on Mac for telemetry. Need to tweak GCS code for Win/Linux
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1166 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-27 20:50:20 +00:00
peabody124
dac82b3c17
Getting closer for HID. Now a well behaved HID device. Just need to update GCS plugin for new data format and make PJRC wrappre work properly on Mac
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1165 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-27 19:09:55 +00:00
peabody124
27d429fe18
Got better HID report design with valid data length embedded in report
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1164 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-27 17:41:56 +00:00
FredericG
66e22b56ce
Fix in bmp085 driver. Was not checking correctly if lock on I2C succeeded => caused an assert when used in combination with other I2C devices
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1163 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-27 09:52:45 +00:00
FredericG
efaa6c910b
MKSerial: also report ground-speed
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1162 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-27 09:49:47 +00:00
peabody124
eb41a84acf
And this
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1161 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-27 08:09:43 +00:00
peabody124
7d7802593e
Oops, sorry missed these files
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1160 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-27 08:08:50 +00:00
peabody124
fe616df48d
Further tweaks. Will start trying to get reliable communication with larger report size tomorrow
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1159 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-27 07:56:50 +00:00
peabody124
840f7ff456
A version of the firmware that successfully Acks back and forth over HID. Still need to refine the PIOS interface and make GCS strip out the report ID data (if necessary). Also note: currently if you run too many modules the watchdog timer kicks in. I haven't determined if this is due to an interrupt binding up or what (and why it doesn't happen more often since I can't find any code that explicitly resets the WWDG).
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1157 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-27 06:22:34 +00:00
peabody124
d89cd43cd1
Further tweaks to the HID update
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1156 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-27 05:28:04 +00:00
peabody124
c46dcea73a
Pretty major update of the USB HID core. Removed a lot of old code related to custom drivers and BSL (which will be brought back under HID). Device enumerates but still not communicating. Hopefully nothing broken, lots changed.
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1155 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-27 03:19:07 +00:00
corvus
2621d07574
Added UAVObjects: FlightSituationActual NavigationSettings NavigationDesired
...
- Added FlighSituation Module (development module for sensor fusion, mostly stub, possibly renamed later)
- Added Navigation Module (development module for navigating towards a point in space - DEVELOPMENT CODE, NOT STABLE YET (I am testing around with this))
- Changed Stabilization Module (uses local reference frame now. Stable except for code cleanup/review. Tested in simulator and outperforms old code.)
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1154 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-26 21:26:28 +00:00
dankers
dab978cf98
DOh! should have been part of last commit.
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1151 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-23 04:35:10 +00:00
dankers
1fb8fc797c
Floss-JTAG file for new Revision B of Floss-JTAG (Rowan JTAG).
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1150 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-23 04:34:32 +00:00
dschin
e5c19a38c5
In the the \OpenPilot\flight\Project\OpenOCD directory there were two JTAG debugging config files:
...
1) floss-jtag.arhs.cfg
2) floss-jtag.openpilot.cfg
But the Eclipse project the "external tools configurations" for the OpenOCD Debug is looking for the "floss-jtag.cfg" file in the command line arguments. The added file "floss-jtag.cfg" is a simply a copy of "floss-jtag.openpilot.cfg". The .arhs.cfg doesn't play well by itself.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1129 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-17 22:43:26 +00:00
peabody124
d928676f5e
More documentation updates, standardizing format to include addtogroup at the beginning of headers so files are associated with modules
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1121 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-16 19:53:35 +00:00
sambas
f5c24d169e
flight/osd: Parse config into setupbits and parameter slots
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1115 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-16 15:24:29 +00:00
peabody124
99e94228a9
More doxygen updates
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1106 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-16 05:31:11 +00:00
peabody124
1cd81e211f
Added Doxygen comments for OpenPilot modules
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1101 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-16 01:02:34 +00:00
peabody124
5c41f95a1e
Updating OSX project file for new file locations
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1100 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-15 02:16:54 +00:00
peabody124
ebeffa4392
Linux compiler error fix
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1097 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-14 15:45:36 +00:00
peabody124
700af355d4
Moved platform dependent configurations to FreeRTOSConfig.h and set windows to run without preemption to reduce CPU usage
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1096 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-14 15:34:57 +00:00
corvus
aa53b57d55
Changed the Build directory for posix port from Build/ to Build.posix/
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1090 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-14 10:08:03 +00:00
corvus
48db68fe3c
add some self made FreeRTOS scheduler documentation
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1088 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-13 18:55:26 +00:00
peabody124
53b90b9492
Updated to use sigwait as an alternative to signals for the timer. Also, added per task suspend/resume flags which should make sure things behave nicely
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1087 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-13 18:29:39 +00:00
corvus
fa57e42efa
Deleted OpenPilot.posix branch. Integrated portability modifications into main tree
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1086 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-13 16:23:41 +00:00
corvus
65d0c93680
Added some comment lines for peabody124 to read ;)
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1078 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-12 17:15:00 +00:00
peabody124
68be63bc50
Conditional signaling now works on linux
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1075 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-11 21:42:59 +00:00
peabody124
cd5c03b809
Ugh, cross platform development.
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1073 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-11 20:46:22 +00:00
peabody124
0bc526a142
Got the tick handler working on linux so it doesnt jump onto the wrong thread
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1072 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-11 20:38:20 +00:00
peabody124
4c4d1ca420
Also added sched_yield().
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1071 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-11 20:27:03 +00:00
peabody124
9ff624bc0f
I'm an idiot. I put ifndef __darwin__ when I meant ifdef. Works on linux now with minimal CPU.
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1070 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-11 20:23:34 +00:00
corvus
ae4a52e0ed
test cases for signal handling
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1069 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-11 16:43:41 +00:00
corvus
71589d2246
simple segfault reproduction
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1068 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-11 15:11:26 +00:00
corvus
0efc69055e
fix in print function *ducks*
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1067 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-11 13:57:20 +00:00
corvus
1dd60b54f6
thread safe printf implementation now
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1066 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-11 13:20:22 +00:00
FredericG
5bb4fedc7f
attitude seq field was removed
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1065 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-11 12:25:43 +00:00
corvus
ece979a4e1
ported latest changes by Vassilis and Stac to Posix version
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1064 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-11 12:13:43 +00:00
peabody124
c6b495cdcc
This version runs stably on all three platforms for me. Corvus, please feel free to revert these changes if you want or have a better solution. Also only Mac tested with GCS, the rest just sit there running nicely
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1063 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-11 02:23:11 +00:00
peabody124
dd598a75a4
This version runs stably on all three platforms for me. Corvus, please feel free to revert these changes if you want or have a better solution. Also only Mac tested with GCS, the rest just sit there running nicely
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1062 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-11 02:22:24 +00:00
vassilis
9f2a01a78a
Flight/Servo Fix Servo driver buffer overflow, was messing up the I2C and altitude readings, now working fine. Servo index used to be 1-8 but the Servo driver was indexing a buffer out of bounds. Changed everything to use index 0-7 for servo outputs.
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1061 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-11 01:54:43 +00:00
stac
3896baa908
usb hid: fix compiling with ALLOW_HID_TELEMETRY
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1060 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-10 14:56:27 +00:00
peabody124
bd197886e5
Added some include files for task.c and removed an asserting that is sometimes violated in the signal handler
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1059 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-10 14:07:28 +00:00
peabody124
083886615a
Ok, so its run for a bit on my windows and mac computer, although I've seen a few glitches. Also, need the version of tasks.c in peabody124 which disables interrupts while in the nanosleep command. Unfortunately for windows I have to turn of all the cpu optimization code to make it reliable for now, so it eats cycles
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1057 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-10 07:31:58 +00:00
sambas
9003cd8eca
OP-97 flight/GPS: GeoidSeparation added, need to think that precision problem
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1056 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-10 07:27:07 +00:00
peabody124
db1dde5d8c
Pretty major rewrite which can either run with thread monitoring (windows) or with conditional waits. Definitions in file set mode, but robust for all modes on OSX, now for windows testing
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1054 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-10 06:25:33 +00:00
peabody124
60fda40c42
Much more stable on windows now
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1048 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-08 16:24:34 +00:00
corvus
cb9afef32d
Pios.posix - FreeRTOS port for cygwin - test-file to debug signal and mutex handling
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1047 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-08 10:28:50 +00:00
peabody124
c2cb17ffe7
Working on windows
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1046 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-07 20:43:05 +00:00
peabody124
bd13811255
A ridiculously simple version that just avoids almost all signal handling needs
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1045 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-07 18:36:05 +00:00
corvus
2ebe830624
reverting accidental commit
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1044 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-07 17:47:22 +00:00
corvus
5c7324a28b
PiOS.posix - thread management - another variant to test on win32
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1043 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-07 17:45:12 +00:00
peabody124
5f174108b1
Initial work on pthread_cond based locking, minimizing signal handling (but trusting mutexes)
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1042 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-07 17:43:12 +00:00
corvus
3370f75da1
PiOS.posix - more changes to increase cygwin runability
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1041 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-07 16:40:38 +00:00
corvus
f82783d77e
PiOS.posix | more attempts to fix it on win32
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1040 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-07 14:43:36 +00:00
peabody124
5f6b3eb11a
XCode project file for Mac development (for the Posix port)
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1039 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-07 14:28:48 +00:00
corvus
034d66197b
PiOS.posix: bug fix in new scheduler emergency handler
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1038 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-07 13:09:42 +00:00
corvus
447be5c0a0
PiOS.posix - new version of debugging enabled custom port.c
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1037 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-07 12:21:36 +00:00
corvus
64a8302f5a
PiOS.posix scheduler - added port.c with debug output for testing
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1036 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-07 10:47:23 +00:00
corvus
0662269625
some fixed - might run on windows now
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1035 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-07 09:40:17 +00:00
peabody124
48596e838e
Cleaned up some signal handling a bit, some handshaking at task switching. For some reason nanosleep occasionally causes problems. Something about it not being a cancellation point
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1034 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-06 23:25:34 +00:00
peabody124
6caf552753
My version that works on linux and mac, not windows
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1033 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-06 22:51:58 +00:00
corvus
ec48207755
PiOS posix scheduler - added simple docu about scheduler work
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1032 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-06 21:56:43 +00:00
corvus
7aa693ed3e
PiOS posix port - threading - test implementation
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1031 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-06 21:55:22 +00:00
corvus
b13f8296dc
POSIX port: some improvements as suggested by stac
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1024 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-04 21:44:09 +00:00
corvus
2e373c5dfc
pios_com_udp: explicit type cast to prevent compiler warning
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1020 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-04 11:24:43 +00:00
corvus
455a99a3cf
some changes to increase platform independence
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1017 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-04 09:27:53 +00:00
corvus
c7479b796b
merged chages 995:1015 into posix branch
...
(See? That's why I hate branching - thank the gods that subversion has the "merge" command)
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1016 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-04 08:50:40 +00:00
stac
17bea4cb91
ahrscomms: connect the OP board to the AHRS board
...
The AHRS comms module now sync's with the AHRS and
exchanges interesting data periodically. Whenever
the link to the AHRS is down, the AHRSComms alarm is
raised.
This is fairly basic for now but provides the last
piece of the infrastructure to move data back/forth
between the OP and the AHRS.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1014 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-04 02:21:49 +00:00
stac
05485e5b63
ahrs: tie main loop into SPI link FSM
...
- AHRS mainloop now runs flat out updating sensor data and
processing any messages sent from the OP board.
- Raw data is provided from the magnetometers
- Fake data is provided for attitude solution
- Correct data is provided for serial number queries
Note: There is a bug in the i2c code that very quickly leaves the
magnetometer in a broken state and returning incorrect values.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1013 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-04 02:21:47 +00:00
stac
29a8f05ac9
mag sensor: put some bounds on the parameters
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1012 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-04 02:21:45 +00:00
stac
a3a2dbd634
spi: Add support for hardware CRC generation/checking
...
PIOS SPI devices may now make use of automatic CRC generation
and checking on block transfers. Only supports CRC8 for now.
Since the SPI interface CRC calculation continues across message
boundaries (ie. not reset on every transfer), we must manually reset
the CRC registers for every transfer to allow the two sides of the
link to resynchronize.
Unfortunately, resetting the CRC registers requires disabling the
SPI peripheral which must now be done on every block transfer.
Note: The last byte of the tx buffer is never sent and is assumed to
be a place holder for the tx CRC8.
Note: The last byte of the rx buffer is expected to hold the rx CRC8.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1011 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-04 02:21:42 +00:00
stac
c12b7e3fed
spi: tx buffer is now const
...
Tx buffers should not be modified. This allows passing const data
to the transfer function.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1010 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-04 02:21:40 +00:00
stac
548a32f18b
attitude: Rename Attitude module to AHRSComms
...
The Attitude module will soon be handling updates for all UAVObjects
that require data from the AHRS. To reflect this expansion of scope,
it has been renamed to AHRSComms.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1009 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-04 02:21:37 +00:00
stac
1425ab1786
ahrs status: Add AhrsStatus UAVObject
...
This object currently only holds the serial number of the attached
AHRS board. This will be retrieved each time communications are
(re)established with the AHRS board.
This will eventually be extended to hold some statistics for OP to
AHRS comms.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1008 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-04 02:21:34 +00:00
stac
1bbc8381c0
heading: Add HeadingActual UAVobject
...
This object currently holds only the raw magnetometer readings and
an instantaneous heading calculation which are only really useful
for debugging. The contents of this object will change often as
development progresses.
Note: The magnetometer values are often garbage due to a problem
with i2c software on the AHRS.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1007 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-04 02:21:31 +00:00
stac
0e6294ca27
spi: remove internal pull-up from input data lines
...
The input data lines between the OP and AHRS boards had internal
pull-ups enabled. This seemed to be causing issues early on
during development of the inter-board comms. Not sure if this
is still necessary but this is how the current code was tested.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1006 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-04 02:21:26 +00:00
stac
e3824a6d78
ahrs spi: Add AHRS SPI link management FSM
...
To the outside world, the AHRS can be in one of only a few
primary states:
Not present - AHRS is absent or non-responsive via SPI
Inactive - Only link-level status messages are processed
Ready - Ready to receive the next application level message
Busy - Application level message is being processed
Internal to the AHRS, there are many more states that need to be
managed. This FSM provides the necessary decoupling between the
ISR (which is being driven by the SPI link) and the AHRS main
processing loop which must continue to run its filters independently
of the SPI messaging rate.
With this structure, SPI messages can be received at any time but
processed at only specific points within the filter chains.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1005 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-04 02:21:22 +00:00
stac
89a6d6d912
ahrs spi: Add definition of OP<->AHRS SPI protocol
...
This defines the SPI message format as well as a few
initial messages for moving data across the link.
The v0 messages are place holders for firmware download
in the bootloader.
The v1 messages are to be used by the main application.
Note: This is not the final protocol definition.
Subject to change without notice.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1004 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-04 02:21:15 +00:00
stac
3eceef43d3
spi: Connect device specific DMA IRQ handlers
...
Mark the device specific DMA IRQ handlers as strongly linked
aliases for the genericly named interrupt vector symbol.
Here's how this works...
* The address of the symbol DMA1_Channel2_IRQHandler is written
into the DMA1/Channel2 interrupt vector by the linker script.
* The startup_*.S file specifies Default_Handler() as a weakly
linked alias for DMA1_Channel2_IRQHandler.
* We now override the weakly linked alias with the strongly linked
PIOS_SPI_sdcard_irq_handler().
* This results in the address of PIOS_SPI_sdcard_irq_handler() being
written to the vector table for the DMA1/Channel2 interrupt.
* The PIOS_SPI_sdcard_irq_handler() function is now called whenever
the DMA1/Channel2 interrupt fires.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1003 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-04 02:21:13 +00:00
stac
b084fc4be5
alarms: Add alarm for AHRS Communications
...
The AHRSComms alarm will be raised whenever the OP board
is not able to communicate with the AHRS board.
The navigation software on the OP board could use this
alarm to trigger its best attempt at an emergency landing.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1002 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-04 02:21:11 +00:00
stac
71e491e3c1
com: mark tx buffer as const throughout API
...
The com layer transmit functions should provide guarantees
that they will not modify the buffer that you're transmitting.
Declaring the parameter as a pointer to const keeps the underlying
implementations honest.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1001 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-04 02:21:08 +00:00
stac
1cc6981ee5
attitude: Remove seq field from uavobject
...
The sequence number field for the attitude solution is
likely unnecessary. Removed.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1000 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-04 02:21:04 +00:00
stac
4f8d81343f
spi: assert on invalid SPI device
...
TransferByte API is simplified to either assert or
return the rx byte.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@999 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-04 02:21:00 +00:00
stac
1169514bf9
sd card: fix SD R1 detection
...
SD R1 response format is defined as any byte with the MSb
cleared. The code was testing for any byte that was not 0xFF
which can lead to misinterpreting a byte as the response.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@998 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-04 02:20:57 +00:00
stac
5c230e734d
ahrs: Turn on -Werror for AHRS build
...
Disallow warnings of any kind in AHRS code.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@997 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-04 02:20:54 +00:00
corvus
edcf4f76f0
deleted patch file since it's no longer needed
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@996 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-03 21:51:37 +00:00
corvus
e2176d3117
- renamed PiOS.x86 into PiOS.posix
...
- created temporary branch of OpenPilot (OpenPilot.posix) in order to test multi platform changes on hardware before committing to the main branch
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@995 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-03 21:50:13 +00:00
corvus
8cd1a494ab
decrease FreeRTOS idle CPU on x86 load from 100 to 0.001 by adding call to nanosleep.
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@992 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-03 09:36:01 +00:00
sambas
1a7a9aa250
flight/osd: config write retry routine, my original empty config array.
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@986 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-02 18:49:42 +00:00
sambas
aa1ddca8bf
flight/osd: ET osd write config work, dump format also same as write array. use with caution
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@985 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-02 14:54:04 +00:00
corvus
ad4008bc11
minIni removed from PiOS.x86
...
added x86 patch to subversion since JIRA is acting up
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@967 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-01 10:34:25 +00:00
dankers
0d38dfc745
Minini removed from PiOS
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@966 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-01 08:57:40 +00:00
dankers
e47f755c30
Minini removed from OpenPilot
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@965 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-01 08:57:06 +00:00
dankers
84c944b4fe
Old Documentation removal, legacy from very early in the project. This information should be on the Wiki.
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@962 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-07-01 04:44:35 +00:00
peabody124
6715565727
Make CODE_SOURCERY switch affect rm command
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@909 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-06-27 19:44:39 +00:00
corvus
694f7e7feb
OP-85
...
x86 port of PiOS - including pios_com - UDP support
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@905 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-06-27 14:14:07 +00:00
FredericG
55f13788de
FlightBatteryState Object : Made Voltage and Current fields float
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@895 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-06-26 10:59:11 +00:00
FredericG
8204143f9d
MKSerial: Do not generate BatteryState as this is now generated by the battery-module
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@894 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-06-26 10:31:27 +00:00
FredericG
302be3ee6f
OSD: Send battery-current info to OSD. Consumed mAh is calculated by the OSD
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@893 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-06-26 10:27:10 +00:00
vassilis
c74eb2f0e9
OP-26 Flight/Stabilization First release of stabilization module. Tested using FlightGear, default tuning is for the HITL simulation. Works fairly well but a number of improvements can be made to aid tuning. The ManualControl settings must be first set as you would normally do for HITL simulation, flight mode is changed using the mode channel.
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@887 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-06-25 02:28:16 +00:00
FredericG
6ef11148b5
First version of battery module
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@882 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-06-24 11:10:43 +00:00
FredericG
6c40edccf2
ET OSD: WIP: dumping of config-blob to serial port
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@852 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-06-21 20:02:03 +00:00
FredericG
3bc938d45e
lowered I2C timoout whne using RTOS
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@842 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-06-21 09:19:02 +00:00
FredericG
d7390a07a5
MKSerial: use AUX port
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@840 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-06-20 18:08:41 +00:00
FredericG
c8f818a809
Do not configure the servo outputs when ENABLE_AUX_UART
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@839 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-06-20 18:02:26 +00:00
FredericG
fba5164634
Enable AUX UART with ENABLE_AUX_UART in Makefile
...
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@838 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-06-20 18:01:21 +00:00