Skip to content

Commit 962b2d8

Browse files
committed
fix: Added copyright notice on the servo_control.c file
1 parent 05332ea commit 962b2d8

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

components/motor/servo/examples/servo_control/main/servo_control.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/*
2+
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
17
#include <stdio.h>
28
#include <math.h>
39
#include "freertos/FreeRTOS.h"
@@ -15,14 +21,13 @@ static const char *TAG = "Servo Control";
1521
static uint16_t calibration_value_0 = 30; // Real 0 degree angle
1622
uint16_t calibration_value_180 = 195; // Real 0 degree angle
1723

18-
1924
// Task to test the servo
2025
static void servo_test_task(void *arg)
2126
{
2227
ESP_LOGI(TAG, "Servo Test Task");
2328
while (1) {
2429
// Set the angle of the servo
25-
for(int i = calibration_value_0; i <= calibration_value_180; i += 1) {
30+
for (int i = calibration_value_0; i <= calibration_value_180; i += 1) {
2631
iot_servo_write_angle(LEDC_LOW_SPEED_MODE, 0, i);
2732
vTaskDelay(20 / portTICK_PERIOD_MS);
2833
}

0 commit comments

Comments
 (0)