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

.ino -> .h/.cpp переход #6

Open
vahron opened this issue Mar 1, 2021 · 1 comment
Open

.ino -> .h/.cpp переход #6

vahron opened this issue Mar 1, 2021 · 1 comment

Comments

@vahron
Copy link
Contributor

vahron commented Mar 1, 2021

Привет команда, как насчет перевода .ino файлов в стандартные .h/.cpp файлы? Сейчас билд работает, но выводит тонны ошибок из-за того, что .ino файлы конвертируются на лету.

Предлагаю перевести все файлы кроме главного GyverLamp2.ino. Система сборки через PlatformIO не будет ругаться. При этом ArduinoIDE по-прежнему будет работать, открываться по клику на gyverlamp2.ino и показывать весь код прошивки.

vahron-mbp:PlatformIO vahron$ pio check
Checking debug > cppcheck (platform: espressif8266; board: d1_mini; framework: arduino)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
/Users/vahron/self/GyverLamp2/firmware/GyverLamp2/startup.ino:59: [high:error] Condition 'flag' is always false [knownConditionTrueFalse]
/Users/vahron/self/GyverLamp2/firmware/GyverLamp2/time.ino:84: [low:style] Variable 'packet' is assigned a value that is never used. [unreadVariable]
/Users/vahron/self/GyverLamp2/firmware/GyverLamp2/time.ino:85: [low:style] Variable 'packet' is assigned a value that is never used. [unreadVariable]
/Users/vahron/self/GyverLamp2/firmware/GyverLamp2/time.ino:86: [low:style] Variable 'packet' is assigned a value that is never used. [unreadVariable]
/Users/vahron/self/GyverLamp2/firmware/GyverLamp2/time.ino:87: [low:style] Variable 'packet' is assigned a value that is never used. [unreadVariable]
/Users/vahron/self/GyverLamp2/firmware/GyverLamp2/time.ino:88: [low:style] Variable 'packet' is assigned a value that is never used. [unreadVariable]
/Users/vahron/self/GyverLamp2/firmware/GyverLamp2/time.ino:89: [low:style] Variable 'packet' is assigned a value that is never used. [unreadVariable]
/Users/vahron/self/GyverLamp2/firmware/GyverLamp2/time.ino:90: [low:style] Variable 'packet' is assigned a value that is never used. [unreadVariable]
/Users/vahron/self/GyverLamp2/firmware/GyverLamp2/time.ino:91: [low:style] Variable 'packet' is assigned a value that is never used. [unreadVariable]
/Users/vahron/self/GyverLamp2/firmware/GyverLamp2/time.ino:92: [low:style] Variable 'packet' is assigned a value that is never used. [unreadVariable]
/Users/vahron/self/GyverLamp2/firmware/GyverLamp2/time.ino:93: [low:style] Variable 'packet' is assigned a value that is never used. [unreadVariable]
/Users/vahron/self/GyverLamp2/firmware/GyverLamp2/time.ino:94: [low:style] Variable 'packet' is assigned a value that is never used. [unreadVariable]
/Users/vahron/self/GyverLamp2/firmware/GyverLamp2/eeprom.ino:6: [low:style] The function 'EE_startup' is never used. [unusedFunction]
/Users/vahron/self/GyverLamp2/firmware/GyverLamp2/button.ino:3: [low:style] The function 'button' is never used. [unusedFunction]
/Users/vahron/self/GyverLamp2/firmware/GyverLamp2/analog.ino:116: [low:style] The function 'checkAnalog' is never used. [unusedFunction]
/Users/vahron/self/GyverLamp2/firmware/GyverLamp2/startup.ino:1: [low:style] The function 'checkButton' is never used. [unusedFunction]
/Users/vahron/self/GyverLamp2/firmware/GyverLamp2/eeprom.ino:47: [low:style] The function 'checkEEupdate' is never used. [unusedFunction]
/Users/vahron/self/GyverLamp2/firmware/GyverLamp2/startup.ino:37: [low:style] The function 'checkGroup' is never used. [unusedFunction]
/Users/vahron/self/GyverLamp2/firmware/GyverLamp2/analog.ino:117: [low:style] The function 'checkMusic' is never used. [unusedFunction]
/Users/vahron/self/GyverLamp2/firmware/GyverLamp2/analog.ino:118: [low:style] The function 'checkPhot' is never used. [unusedFunction]
/Users/vahron/self/GyverLamp2/firmware/GyverLamp2/startup.ino:165: [low:style] The function 'checkUpdate' is never used. [unusedFunction]
/Users/vahron/self/GyverLamp2/firmware/GyverLamp2/effects.ino:1: [low:style] The function 'effectsRoutine' is never used. [unusedFunction]
/Users/vahron/self/GyverLamp2/firmware/GyverLamp2/parsing.ino:1: [low:style] The function 'parsing' is never used. [unusedFunction]
/Users/vahron/self/GyverLamp2/firmware/GyverLamp2/presetManager.ino:1: [low:style] The function 'presetRotation' is never used. [unusedFunction]
/Users/vahron/self/GyverLamp2/firmware/GyverLamp2/analog.ino:115: [low:style] The function 'setupADC' is never used. [unusedFunction]
/Users/vahron/self/GyverLamp2/firmware/GyverLamp2/time.ino:1: [low:style] The function 'setupTime' is never used. [unusedFunction]
/Users/vahron/self/GyverLamp2/firmware/GyverLamp2/startup.ino:76: [low:style] The function 'showRGB' is never used. [unusedFunction]
/Users/vahron/self/GyverLamp2/firmware/GyverLamp2/startup.ino:69: [low:style] The function 'startStrip' is never used. [unusedFunction]
/Users/vahron/self/GyverLamp2/firmware/GyverLamp2/startup.ino:85: [low:style] The function 'startWiFi' is never used. [unusedFunction]
/Users/vahron/self/GyverLamp2/firmware/GyverLamp2/time.ino:16: [low:style] The function 'timeTicker' is never used. [unusedFunction]
/Users/vahron/self/GyverLamp2/firmware/GyverLamp2/startup.ino:181: [low:style] The function 'tryReconnect' is never used. [unusedFunction]
Error: cppcheck failed to perform check! Please examine tool output in verbose mode.
================================================================================= [FAILED] Took 8.32 seconds =================================================================================

Component                                           HIGH    MEDIUM    LOW
-------------------------------------------------  ------  --------  -----
/Users/vahron/self/GyverLamp2/firmware/GyverLamp2    1        0       30

Total                                                1        0       30

Environment    Tool      Status    Duration
-------------  --------  --------  ------------
release        cppcheck  IGNORED
debug          cppcheck  FAILED    00:00:08.316
wireless       cppcheck  IGNORED
============================================================================ 1 failed, 0 succeeded in 00:00:08.316 ============================================================================
vahron-mbp:PlatformIO vahron$
@AlexGyver
Copy link
Owner

Привет, для этого нужно переписать добрую часть проекта)

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

No branches or pull requests

2 participants