Skip to content

Commit 6b34647

Browse files
committed
bug same bar value arribada#1
16.1 debug pgysical was good
1 parent 8bca6b4 commit 6b34647

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ports/nrf52840/core/hardware/ads1015/ads1015.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,12 @@ void ads1015LL::read(double& digital_value) {
5959
DEBUG_TRACE("sample adc test");
6060
int digital_value_int;
6161
DEBUG_TRACE("ads1015LL::read: %u bin", bin_value);
62-
bin_value = bin_value >> 4; // /!!! Tom test ">> 5" normaly
62+
bin_value = bin_value >> 4; // /!!! Tom test ">> 4" normaly
6363
digital_value_int = (int)(bin_value);
6464
digital_value = (double)digital_value_int;
6565
DEBUG_TRACE("ads1015LL::read: digital value int = %u ", digital_value_int);
6666
DEBUG_TRACE("ads1015LL::read: digital value = %f ", digital_value);
67-
DEBUG_TRACE("ads1015LL::read: %u bin >>5 digital value = %f ", bin_value,digital_value);
67+
DEBUG_TRACE("ads1015LL::read: %u bin >> 4 digital value = %f ", bin_value,digital_value);
6868
//digital_value = (double)digital_value;
6969
DEBUG_TRACE("ads1015LL::read: %f digit", digital_value);
7070
digital_value = (digital_value/1652)*5;
@@ -85,6 +85,7 @@ uint16_t ads1015LL::sample_adc(uint8_t measurement) {
8585
DEBUG_TRACE("ads1015LL::sample_adc1");
8686
NrfI2C::read(m_bus,m_addr,read_buffer,2);
8787
DEBUG_TRACE("ads1015LL::sample_adc2 ");
88+
DEBUG_TRACE("buffer = %u",read_buffer);
8889
return ((uint16_t)read_buffer[0] << 8 ) + ((uint16_t)read_buffer[1]);
8990

9091
}

0 commit comments

Comments
 (0)