Subversion Repositories FlightCtrl

Rev

Rev 1652 | Rev 1657 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1652 Rev 1654
Line 84... Line 84...
84
                        }
84
                        }
85
                                else i2c_write_byte(0x52+(motor*2));
85
                                else i2c_write_byte(0x52+(motor*2));
86
                        break;
86
                        break;
87
                case 1:
87
                case 1:
88
                        i2c_write_byte(Motor[motor].SetPoint);
88
                        i2c_write_byte(Motor[motor].SetPoint);
89
                        if(!(Motor[motor].Version & MOTOR_STATE_NEW_PROTOCOL_MASK) || RequiredMotors > 6)
89
                        if(!(Motor[motor].Version & MOTOR_STATE_NEW_PROTOCOL_MASK))
90
                        {
90
                        {
91
                                twi_state = 4; //jump over sending more data
91
                                twi_state = 4; //jump over sending more data
92
                        }
92
                        }
93
                        else if(!(Motor[motor].SetPointLowerBits || (BLFlags & BLFLAG_SEND_CONFIG)))
93
                        else if(!( (Motor[motor].SetPointLowerBits && RequiredMotors < 7) || (BLFlags & BLFLAG_SEND_CONFIG)))
94
                        {
94
                        {
95
                                twi_state = 4; // skip state
95
                                twi_state = 4; // skip state
96
                        }
96
                        }
97
                        break;
97
                        break;
98
                case 2: // lower bits of setpoint (higher resolution)
98
                case 2: // lower bits of setpoint (higher resolution)
Line 170... Line 170...
170
                                BLFlags |= BLFLAG_TX_COMPLETE;
170
                                BLFlags |= BLFLAG_TX_COMPLETE;
171
                        }
171
                        }
172
                        else
172
                        else
173
                        {
173
                        {
174
                                Motor[motorread].State |= MOTOR_STATE_PRESENT_MASK; // set present bit
174
                                Motor[motorread].State |= MOTOR_STATE_PRESENT_MASK; // set present bit
175
                                if(motorread == motorread_temperature)
175
                                if( (motorread == motorread_temperature) || (BLFlags & BLFLAG_READ_VERSION) )
176
                                {
176
                                {
177
                                        read_more = 1;
177
                                        read_more = 1;
178
                                        I2C_ReceiveByte();
178
                                        I2C_ReceiveByte();
179
                                }
179
                                }
180
                                else
180
                                else