Skip to content

Commit

Permalink
Code compiles. Added a \'t\' command to main.cpp to call the dma base…
Browse files Browse the repository at this point in the history
…d timer input capture function. Can't quite nail the reading of the PPM signal from the PPM encoder... will continue to fiddle with the dma and timer
  • Loading branch information
0xjairo committed Dec 15, 2011
1 parent 2a054ad commit 0be2f41
Show file tree
Hide file tree
Showing 4 changed files with 186 additions and 259 deletions.
4 changes: 2 additions & 2 deletions esc-control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ const char* dummy_data = ("qwertyuiopasdfghjklzxcvbnmmmmmm,./1234567890-="


void ppm_decode(void){
SerialUSB.println("Decoding DIY Drones PPM encoder on pin D15");
SerialUSB.println("Decoding DIY Drones PPM encoder on pin D27");

int pin = 15;
int pin = 27;
uint8 prev_state;
int time_elapsed = 0;
int time_start = 0;
Expand Down
9 changes: 8 additions & 1 deletion main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "wirish.h"
#include "utils.h"
#include "esc-control.h"
//#include "ppm-decode.h"
#include "ppm-decode.h"


// ASCII escape character
Expand Down Expand Up @@ -66,6 +66,13 @@ int main(void) {
break;

case '?':
SerialUSB.println("no help available");
break;

case 'd':
ppm_decode_interrupt_dma();
break;

case 'h':
cmd_print_help();
break;
Expand Down
Loading

0 comments on commit 0be2f41

Please sign in to comment.