Revision 902fa82f forklift/code/forklift.c

View differences:

forklift/code/forklift.c
65 65
  {
66 66
    internal_index = data[0];
67 67
    if (len > 1)
68
  {
69
    if (internal_index == FORKLIFT_HEIGHT_SETPOINT) {
70
        internal_data[internal_index] = data[1];
71
        i_term = 0;
72
    }
73
    else if (internal_index == FORKLIFT_LINE_THRESH_HIGH)
74 68
    {
75
      internal_data[internal_index] = data[1];
76
    line_set_threshold_high(data[1]);
77
    }
69
      if (internal_index == FORKLIFT_HEIGHT_SETPOINT)
70
      {
71
          internal_data[internal_index] = data[1];
72
          i_term = 0;
73
      }
74
      else if (internal_index == FORKLIFT_LINE_THRESH_HIGH)
75
      {
76
        internal_data[internal_index] = data[1];
77
        line_set_threshold_high(data[1]);
78
      }
78 79
      else if (internal_index == FORKLIFT_LINE_THRESH_LOW)
79
    {
80
      internal_data[internal_index] = data[1];
81
    line_set_threshold_low(data[1]);
80
      {
81
        internal_data[internal_index] = data[1];
82
        line_set_threshold_low(data[1]);
83
      }
82 84
    }
83 85
  }
84
  }
85 86
}
86 87

  
87 88
void slave_tx(void)

Also available in: Unified diff