Project

General

Profile

Revision 812788aa

ID812788aa5bc592cf417de345fdd8a74933d7a0c8

Added by Thomas Mullins almost 4 years ago

Moved some sensors to different timers

Most notably, change the ROS millisecond counter to share the BOM 38 kHz
timer instead of having its own. The range sensor and BOM rx will now
share timer 5, but they both have to be fixed for the higher F_CPU.

View differences:

scout_avr/src/main.cpp
5 5

  
6 6
ros::Publisher *ptest_out;
7 7

  
8
void debug(const char *str) {
8
void debug(const char *str)
9
{
9 10
}
10 11

  
11 12
void callback(const std_msgs::Int16& msg)
......
49 50

  
50 51
Atmega128rfa1 avr;
51 52

  
52
void debug(const char *str) {
53
void debug(const char *str)
54
{
53 55
  avr.puts(str);
54 56
}
55 57

  
......
68 70
    now = avr.time();
69 71
    if (now > next) {
70 72
      next = now + 100;
73
      ultoa(now, buf, 10);
74
      avr.puts(buf);
75
      avr.puts("\r\n");
71 76
      id++;
72 77
      if (id == 0x40) {
73 78
        id = 0;
......
79 84
      avr.puts(", ");
80 85
      utoa(range_get(1), buf, 10);
81 86
      avr.puts(buf);*/
82
      for (i = 0; i < 4; i++) {
87
      /*for (i = 0; i < 4; i++) {
83 88
        bom_send(i);
84 89
        int msg = bom_get(i);
85 90
        if (msg != BOM_NO_DATA) {
......
94 99
          avr.puts(buf);
95 100
          avr.puts(")\r\n");
96 101
        }
97
      }
102
      }*/
98 103
    }
99 104
  }
100 105
  return 0;

Also available in: Unified diff