void shutdownSensor(Sensor *s) { switch (s->type) { case SHAFT_ENCODER: encoderShutdown(s->enc); // free(s->enc); // print("encoder shutdown"); break; case GYROSCOPE: gyroShutdown(s->gyr); break; case ULTRASONIC: ultrasonicShutdown(s->ult); break; default: break; } }
void killDriveEncoders() { encoderShutdown(encDriveBL); encoderShutdown(encDriveBR); }