Michael Hope
0a335c01ae
Check if the IMU is 'good' and periodically re-initialise if not.
2014-02-22 19:14:47 +01:00
Michael Hope
e1e56169b8
Bound the IMU into the rest of the interface and made it send.
2014-02-21 22:46:56 +01:00
Michael Hope
c95e4f4598
Added build rules for i2cdevlib.
2014-02-21 22:45:39 +01:00
Michael Hope
db6b03c272
Added a combined MPU 6050 and I2C driver.
2014-02-21 22:44:41 +01:00
Michael Hope
bd796af05b
Added more checks around the tick resolution.
...
Changed to match the new crystal.
Upped the baud rate to 57600. 12 MHz divides well to most rates...
2014-02-02 15:04:14 +01:00
Michael Hope
e3fb665c8d
Changed the servos to be biased around 1.5 ms to handle the new 12 MHz
...
clock.
2014-02-02 15:02:53 +01:00
Michael Hope
6aa37305fc
Changed the clock to match the new crystal.
...
Changed remote flashing to use temporary files instead of needing a tree.
Removed fuse setting as it's done in the bootloader.
2014-02-02 15:00:32 +01:00
Michael Hope
0b4e52e848
Pushed the reference into the demands struct.
...
Added counters.
Hooked the link statistics into the counters.
2014-01-14 19:57:54 +01:00
Michael Hope
b07a2f29a7
Enable interrupts before running.
...
Add an encoded version of the CPU frequency as a reference.
Set the centre to 150 now that the CPU frequency is correct.
2014-01-07 22:34:54 +01:00
Michael Hope
c24ca4ea19
Added the missing main().
...
Fixed a overflow error due to the higher clock.
2014-01-05 19:31:36 +01:00
Michael Hope
93f6b12759
Set the servos based on what is in control.
2014-01-05 16:21:28 +01:00
Michael Hope
78b1b73398
Bump the CPU frequency to match the one and only board.
2014-01-05 16:20:17 +01:00
Michael Hope
e8d06048d8
Hack: don't fail if we can't reset.
2014-01-05 16:19:49 +01:00
Michael Hope
f90a8ec73c
Changed to a data register empty interrupt.
...
Shifted the first byte transmit to the interrupt handler.
2013-12-31 22:00:51 +01:00
Michael Hope
2e91637dec
Did the bandwidth calculations, which look fine.
...
Only send the PWM inputs if they're being received.
Send PWM inputs at up to a 50 ms rate.
2013-12-30 19:40:11 +01:00
Michael Hope
493dd1efb0
Changed all timer ticks to milliseconds to make it more readable.
2013-12-30 19:20:56 +01:00
Michael Hope
ad1b6fdd54
Watch the PWMIn and process when the input changes, instead of on a
...
timer.
Split the different poll()s out into their own functions.
Add a prescaler on the tick timer to reduce the CPU load.
2013-12-30 19:03:04 +01:00
Michael Hope
79ada60302
Fixed the build by removing the dependancy on the removed start.cc.
2013-12-30 19:02:14 +01:00
Michael Hope
4bef38a92a
Dropped the configuration from PWMIn. Instead, use the whole of PORTB.
...
Added a counter that bumps when channel 0 changes.
2013-12-30 19:00:53 +01:00
Michael Hope
8dd0762b75
Made the input positions a bit less magic numberie.
2013-12-29 21:20:57 +01:00
Michael Hope
10ed26fa7b
A round of linting.
2013-12-29 21:14:19 +01:00
Michael Hope
6d6bef2bb6
Reworked the supervisor.
2013-12-29 21:09:31 +01:00
Michael Hope
81394d340d
Added many more fields to the state message.
...
Poll PWMIn and update supervisor.
Send state when it changes.
Update the flash patterns based on shutdown.
2013-12-29 21:08:31 +01:00
Michael Hope
afb95d1721
Fixed the initilisation of the pin on PWMIn.
2013-12-29 21:07:58 +01:00
Michael Hope
866a73227e
Drop the state from heartbeat and move to a new State message.
...
Add a Demand message and basic handling.
Add a helper to properly round tick counts.
2013-12-29 18:50:44 +01:00
Michael Hope
7a69136569
Change to an easier to understand 'Missing'.
2013-12-29 18:47:32 +01:00
Michael Hope
e064b6931b
Bump the RX buffer size to handle the 8 byte demand message.
2013-12-29 18:46:12 +01:00
Michael Hope
577c332af1
Add a helper to accuratly round a timer interval.
...
Switch to a request model for unusual messages.
Add reporting of the long version.
2013-12-28 21:19:24 +01:00
Michael Hope
662b71418a
Split the link TX and RX buffer sizes.
...
Increase the TX buffer size to fit a long version.
2013-12-28 21:18:32 +01:00
Michael Hope
a8309e8c42
Make version.h be built for main.cc. Also clean.
2013-12-28 21:17:29 +01:00
Michael Hope
1c629bf3c2
Added a tweak to calibrate the systick versus the RC oscillator.
2013-12-28 21:16:53 +01:00
Michael Hope
80f64db6a9
Generate a version number from git.
2013-12-28 20:19:42 +01:00
Michael Hope
e29071ce35
Tidy up after linting.
2013-12-28 19:33:13 +01:00
Michael Hope
bc13ffacc3
Merge branch 'master' of ssh://juju.net.nz/~/git/nppilot
...
Conflicts:
roverif/pwmin.cc
2013-12-28 19:32:44 +01:00
Michael Hope
8130dd353f
Switched to 'high speed mode' as the UART divisor wasn't very accurate
...
at 38400 baud.
2013-12-28 19:26:54 +01:00
Michael Hope
1454c8bf7b
Use the whole of PORTB for the PWM inputs.
...
Enable the pullups to stop noise turning into a PWM count.
Add a constant for invalid input.
2013-12-28 19:25:56 +01:00
Michael Hope
94424fd1a4
Added an 'Initial' state to tell rebooted versus shutdown.
2013-12-28 18:35:25 +01:00
Michael Hope
241770ced5
Fixed the breakage after linting.
2013-12-27 21:38:31 +01:00
Michael Hope
adb805860e
Updated everything to the Google style (yay cpplint!).
...
Deleted the unused code.
2013-12-27 21:35:37 +01:00
Michael Hope
2ad3d8da98
Changed Servos from static to an instance to match the other classes.
2013-12-27 20:16:04 +01:00
Michael Hope
de381a0d97
Sped up the reset command.
...
Added a remote-flash command that copies to blue and flashes.
2013-12-27 20:15:13 +01:00
Michael Hope
cbb20793c4
Switched to a 'fill' model. Pulled the send up to common code.
2013-12-18 23:58:39 +00:00
Michael Hope
cff60a194e
Add a minimal bit array just for pending events.
...
Switch message sending to setting deferred events that are checked
when the TX buffer is empty.
2013-12-18 23:52:02 +00:00
Michael Hope
80fe17b7e2
Updated the Makefile to program from blue.
2013-12-18 23:50:17 +00:00
Michael Hope
5f7428944c
Added definitions for the servo limits.
...
Initialise servos to middle.
Minor rework to the ISR to set the OCRs earlier.
2013-12-26 21:46:37 +01:00
Michael Hope
6786609570
Add the PWM input system.
...
Switch to zero based to make the ranges easier.
Switch to a lower prescaler to give better fidelity. Servo output is
now broken.
Send the input message on a timer.
2013-12-21 21:48:45 +01:00
Michael Hope
4d2c2acf80
Fix how escaped characters are modified.
...
Turn on receive interrupts. Receive works!
Add a Python hack to test two way comms on the link.
Fix the red and green pin definitions.
2013-12-20 21:46:38 +01:00
Michael Hope
4ec2551835
Changed the XOR value so a escape doesn't become a null.
...
Added (untested) receive support to Link.
Added simple message dispatch.
Added a ping/pong handler for testing.
2013-12-20 21:16:01 +01:00
Michael Hope
34928e2772
Add the transmit part of the serial link.
...
Expand the heartbeat to include time and state.
2013-12-17 21:47:44 +01:00
Michael Hope
ff22d9982b
Reworking the roverif to be more suited to the ATMEGA.
2013-12-17 20:48:07 +01:00