mirror of
https://github.com/alexandrebobkov/ESP-Nodes.git
synced 2025-08-14 11:07:00 +00:00
ESP-IDF Robot Controls
This commit is contained in:
0
ESP-IDF_Robot/build/.ninja_lock
Normal file
0
ESP-IDF_Robot/build/.ninja_lock
Normal file
@@ -114,7 +114,7 @@ static adc_channel_t channel[2] = {ADC_CHANNEL_0, ADC_CHANNEL_1};
|
||||
#endif
|
||||
|
||||
// Declare struct to hold motors RPMs
|
||||
Motors *motors;
|
||||
Motors *m;
|
||||
|
||||
static QueueHandle_t gpio_evt_queue = NULL;
|
||||
static uint8_t s_led_state = 0;
|
||||
|
@@ -15,7 +15,7 @@
|
||||
|
||||
//static const char *TAG = "ESP IDF Robot";
|
||||
|
||||
//Motors *m;
|
||||
//Motors *motors;
|
||||
|
||||
|
||||
static int adc_raw[2][10];
|
||||
@@ -61,7 +61,7 @@ static void rc_get_raw_data() {
|
||||
ESP_LOGI("ESP IDF Robot", "ADC%d Channel[%d] Raw Data: %d", ADC_UNIT_1 + 1, ADC1_CHAN1, adc_raw[0][1]);
|
||||
ESP_LOGI("Joystick", "Position: %d", interpolate_raw_val(adc_raw[0][0]));
|
||||
ESP_LOGI("Joystick", "Position: %d", interpolate_raw_val(adc_raw[0][1]));
|
||||
motors.motor1_rpm_pcm = interpolate_raw_val(adc_raw[0][1]);
|
||||
m.motor1_rpm_pcm = interpolate_raw_val(adc_raw[0][1]);
|
||||
|
||||
if (do_calibration1_chan0) {
|
||||
ESP_ERROR_CHECK(adc_cali_raw_to_voltage(adc1_cali_chan0_handle, adc_raw[0][0], &voltage[0][0]));
|
||||
|
Reference in New Issue
Block a user