Set DeviceModes type to uint8_t Set APICommand type field uint8_t Added and implemented a seend-lock variable