Subversion Repositories FlightCtrl

Rev

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

Rev 1760 Rev 1765
Line 140... Line 140...
140
        TWAMR = 0;
140
        TWAMR = 0;
141
        TWAR = 0;
141
        TWAR = 0;
142
        TWDR = 0;
142
        TWDR = 0;
143
        TWSR = 0;
143
        TWSR = 0;
144
        TWBR = 0;
144
        TWBR = 0;
145
    I2C_TransferActive = 0;    
145
    I2C_TransferActive = 0;
146
        I2C_Init(0);
146
        I2C_Init(0);
147
        I2C_WriteByte(0);
147
        I2C_WriteByte(0);
148
        BLFlags |= BLFLAG_READ_VERSION;
148
        BLFlags |= BLFLAG_READ_VERSION;
149
}
149
}
Line 295... Line 295...
295
                        }
295
                        }
296
                        else // nothing left
296
                        else // nothing left
297
                        {
297
                        {
298
                                if(BLFlags & BLFLAG_READ_VERSION)
298
                                if(BLFlags & BLFLAG_READ_VERSION)
299
                                {
299
                                {
300
                                        if(!(FCFlags & FCFLAG_MOTOR_RUN) && (Motor[motor_read].MaxPWM == 250) ) Motor[motor_read].Version |= MOTOR_STATE_NEW_PROTOCOL_MASK;
300
                                        if(!(FC_StatusFlags & FC_STATUS_MOTOR_RUN) && (Motor[motor_read].MaxPWM == 250) ) Motor[motor_read].Version |= MOTOR_STATE_NEW_PROTOCOL_MASK;
301
                                        else Motor[motor_read].Version = 0;
301
                                        else Motor[motor_read].Version = 0;
302
                                }
302
                                }
303
                                if(++motor_read >= MAX_MOTORS)
303
                                if(++motor_read >= MAX_MOTORS)
304
                                {
304
                                {
305
                                        motor_read = 0;                 // restart from beginning
305
                                        motor_read = 0;                 // restart from beginning