2020-08-05 01:09 AM
https://www.youtube.com/watch?v=EbWOv_0Lp-U&t=1873s
I saw this YouTube and tried to do the same.
The textArea1Buffer variable declaration error occurred in Screen1View.cpp, and the screen was declared in Screen1View.hpp to complete the compilation.
#include <gui/screen1_screen/Screen1View.hpp>
#include "string.h"
Screen1View::Screen1View()
{
}
void Screen1View::setupScreen()
{
Screen1ViewBase::setupScreen();
}
void Screen1View::tearDownScreen()
{
Screen1ViewBase::tearDownScreen();
}
void Screen1View::analogUpdate(uint32_t value)
{
memset(&textArea1Buffer, 0, TEXTVIEW_BUFF_SIZE);
Unicode::snprintfFloat(textArea1Buffer, sizeof(textArea1Buffer), "%.3f", value * 0.000805664 ); // // 3.3/4096 = 0.000805664//
textArea1.invalidate();
protected:
static const uint16_t TEXTVIEW_BUFF_SIZE = 50;
Unicode::UnicodeChar textArea1Buffer[TEXTVIEW_BUFF_SIZE];
Compile was completed normally in CubeIDE compilation environment.
However, since the ADC value is not updated, turning the potential meter on the LCD bottom does not change.
Why am I doing something wrong and why is the ADC value not updating?
I lost everything for two weeks on this issue. I think I will die. Who can help me?
I attach the main source I wrote.
Why it works on YouTube, but why not?
Please help me.
2020-08-05 02:26 AM
Do you call Screen1View::analogUpdate(uint32_t value) in some kind of timer? Such as : Screen1View::handleTickEvent()
2020-08-10 01:59 AM
Dear allard
Sorry, but please refer to the attached source.
I'm not sure exactly what question you are asking.
thank you
2021-01-11 02:23 AM
I also had a same question like where should we call the Screen1View::analogUpdate function?? in some sort of timer interrupt or can we call it in a main while loop?