Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
maybe-hello-world committed Jan 10, 2023
1 parent 237f5d4 commit f9ca8b9
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions src/views/gpio_simple_motor.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,6 @@ static void process_general_command(TCodeCommand command, GPIOSimpleMotor* motor
motor->current_pwm_duty = new_duty;
return;
}

if (command.command_type == MagnitudeSpeed && command.data.magnitude_speed_command.motion_type == Vibrate && command.data.magnitude_speed_command.channel_id == 0) {
// furi_hal_vibro_on(command.data.magnitude_speed_command.magnitude > 0.1f);
return;
}

if (command.command_type == MagnitudeTimeInterval && command.data.magnitude_time_interval_command.motion_type == Vibrate && command.data.magnitude_time_interval_command.channel_id == 0) {
// furi_hal_vibro_on(command.data.magnitude_time_interval_command.magnitude > 0.1f);
return;
}
}

static uint16_t bt_serial_event_callback(SerialServiceEvent event, void* context) {
Expand Down Expand Up @@ -142,28 +132,13 @@ GPIOSimpleMotor* gpio_simple_motor_alloc(FBP* fbp) {
model->display_text_3 = "Press OK to start";
},
true);


// init gpio??
// furi_hal_clock_mco_enable(app->mco_src, app->mco_div);
// furi_hal_gpio_init_ex(&gpio_usart_tx, GpioModeAltFunctionPushPull, GpioPullUp, GpioSpeedVeryHigh, GpioAltFn0MCO);

return motor;
}

void gpio_simple_motor_free(GPIOSimpleMotor* motor) {
furi_assert(motor);
furi_hal_pwm_stop(DEFAULT_PWM_OUTPUT_ID);

// disable gpio??
// furi_hal_gpio_init_ex(
// &gpio_usart_tx,
// GpioModeAltFunctionPushPull,
// GpioPullUp,
// GpioSpeedVeryHigh,
// GpioAltFn7USART1);
// furi_hal_clock_mco_disable();

view_free(motor->view);
free(motor);
}
Expand Down

0 comments on commit f9ca8b9

Please sign in to comment.