From a9256aec8bff7ba500ea5e7becc14cbcf8187d37 Mon Sep 17 00:00:00 2001 From: galjonsfigur <44552519+galjonsfigur@users.noreply.github.com> Date: Sat, 1 Jun 2019 18:05:19 +0200 Subject: [PATCH] Fix issue #2753 and fix documentation example (#2776) --- app/modules/ads1115.c | 2 +- docs/modules/ads1115.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/modules/ads1115.c b/app/modules/ads1115.c index 0c344361..72181ba4 100644 --- a/app/modules/ads1115.c +++ b/app/modules/ads1115.c @@ -585,7 +585,7 @@ LROT_BEGIN(ads1115_instance) #ifdef ADS1115_INCLUDE_TEST_FUNCTION LROT_FUNCENTRY( test_volt_conversion, test_volt_conversion ) #endif - LROT_TABENTRY( "__index", ads1115_instance ) + LROT_TABENTRY( __index, ads1115_instance ) LROT_FUNCENTRY( __gc, ads1115_lua_delete ) LROT_END(ads1115_instance, ads1115_instance, LROT_MASK_GC_INDEX ) diff --git a/docs/modules/ads1115.md b/docs/modules/ads1115.md index a0935867..9f35933b 100644 --- a/docs/modules/ads1115.md +++ b/docs/modules/ads1115.md @@ -125,7 +125,7 @@ adc1:setting(ads1115.GAIN_6_144V, ads1115.DR_128SPS, ads1115.SINGLE_0, ads1115.C local function comparator(level, when) -- read adc result with read() when threshold reached gpio.trig(alert_pin) - volt, volt_dec, adc, sign = ads1:read() + volt, volt_dec, adc, sign = adc1:read() print(volt, volt_dec, adc, sign) end gpio.mode(alert_pin, gpio.INT)