Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added typedef for font direction as we can enter any value having just #29

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

SyncRone157
Copy link

Added typedef for font direction as we can enter any value having just 4 directions. Entering wrong value we won't get error and won't see text on the display. Adding typedef enum fixes it.

4 directions. Entering wrong value we won't get error and won't see
text on the display. Adding typedef enum fixes it.
@nopnop2002
Copy link
Owner

nopnop2002 commented Jan 13, 2023

No error in my environment.

I want to see your log when compiling.

There is probably some other cause.

$ idf.py build
Executing action: all (aliases: build)
Running ninja in directory /home/nop/rtos/esp-idf-parallel-tft/build
Executing "ninja all"...
[1/7] cd /home/nop/rtos/esp-idf-parall...df-parallel-tft/build/parallel-tft.binparallel-tft.bin binary size 0x3d7a0 bytes. Smallest app partition is 0x100000 bytes. 0xc2860 bytes (76%) free.
[1/1] cd /home/nop/rtos/esp-idf-parall...el-tft/build/bootloader/bootloader.binBootloader binary size 0x6700 bytes. 0x900 bytes (8%) free.

Project build complete. To flash, run this command:
/home/nop/.espressif/python_env/idf5.0_py3.8_env/bin/python ../../esp-idf/components/esptool_py/esptool/esptool.py -p (PORT) -b 460800 --before default_reset --after hard_reset --chip esp32  write_flash --flash_mode dio --flash_size 2MB --flash_freq 40m 0x1000 build/bootloader/bootloader.bin 0x8000 build/partition_table/partition-table.bin 0x10000 build/parallel-tft.bin 0x110000 build/storage0.bin 0x130000 build/storage1.bin 0x140000 build/storage2.bin
or run 'idf.py -p (PORT) flash'

@SyncRone157
Copy link
Author

Yes it is no error, but try to enter the direction for example x >=4 and you will see the result. You won't get any errors and there won't be text on the display. That what I ment. Adding typedef enum allows to get a message during compilation.

@nopnop2002
Copy link
Owner

nopnop2002 commented Jan 13, 2023

I understood your intention.


With ESP-IDF V5.1, ADC-related libraries have been destructively changed.
We will address this in the near future.
I will consider your PR at that time.
Until then, this PR will remain active.

@SyncRone157
Copy link
Author

@nopnop2002 it is not related to ADC, it is type checking allowing to pass into lcdFontSetDirection() value just within the range 0-3, and in case someone tries to pass some other int they will see error during compilation. There is in PR also some cosmetic changes replacing "magic" numbers of direction like 0,1,2,3 to enums.

@nopnop2002
Copy link
Owner

it is not related to ADC

I know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants