Rev 1672 | Rev 1680 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1672 | Rev 1673 | ||
---|---|---|---|
Line 422... | Line 422... | ||
422 | uint8_t I2C_ReadBLConfig(uint8_t motor) |
422 | uint8_t I2C_ReadBLConfig(uint8_t motor) |
423 | { |
423 | { |
424 | uint8_t i; |
424 | uint8_t i; |
Line 425... | Line 425... | ||
425 | 425 | ||
426 | if(MotorenEin || PC_MotortestActive) return(BLCONFIG_ERR_MOTOR_RUNNING); // not when motors are running! |
426 | if(MotorenEin || PC_MotortestActive) return(BLCONFIG_ERR_MOTOR_RUNNING); // not when motors are running! |
- | 427 | if(motor > MAX_MOTORS) return (BLCONFIG_ERR_MOTOR_NOT_EXIST); // motor does not exist! |
|
427 | if((motor == 0) || (motor > MAX_MOTORS)) return (BLCONFIG_ERR_MOTOR_NOT_EXIST); // motor does not exist! |
428 | if(motor == 0) return (BLCONFIG_ERR_READ_NOT_POSSIBLE); |
428 | if(!(Motor[motor-1].State & MOTOR_STATE_PRESENT_MASK)) return(BLCONFIG_ERR_MOTOR_NOT_EXIST); // motor does not exist! |
429 | if(!(Motor[motor-1].State & MOTOR_STATE_PRESENT_MASK)) return(BLCONFIG_ERR_MOTOR_NOT_EXIST); // motor does not exist! |
Line 429... | Line 430... | ||
429 | if(!(Motor[motor-1].Version & MOTOR_STATE_NEW_PROTOCOL_MASK)) return(BLCONFIG_ERR_HW_NOT_COMPATIBLE); // not a new BL! |
430 | if(!(Motor[motor-1].Version & MOTOR_STATE_NEW_PROTOCOL_MASK)) return(BLCONFIG_ERR_HW_NOT_COMPATIBLE); // not a new BL! |