Skip to content

Conversation

timenetworks
Copy link
Contributor

Proposed Changes

i added speaker support for a CYD-2432s028r and CYD-2USB and removed inverted color by default and added pin 1, 3 and 35 for IR TX and pin 1, 3 for IR RX

Types of Changes

Verification

Testing

I tried to check cyd-2432s028r but my project doesn't compile

Linked Issues

#1546 #1438

User-Facing Change

NONE
NONE

Further Comments

Sorry I couldn't check because of a build error
let someone check this change and write that it works

add 1 3 35 pin to ir tx
add 1 3 pin to ir rx
add speaker support for cyd-2423s028 (and cyd-2usb) on 26pin
and removed inverted color by default
@bmorcelli
Copy link
Collaborator

what are the build errors are you facing?

it is better you build and test, as you know your hardware, and let us know the results...

@timenetworks
Copy link
Contributor Author

what are the build errors are you facing?

it is better you build and test, as you know your hardware, and let us know the results...

I have this build error :
`In file included from src/core/display.cpp:1586:
.pio/libdeps/CYD-2432S028/PNGdec/src/PNGdec.h:209: warning: "INTELSHORT" redefined
#define INTELSHORT(p) ((p) + ((p+1)<<8))

In file included from src/core/display.h:25,
from src/core/display.cpp:1:
.pio/libdeps/CYD-2432S028/AnimatedGIF/src/AnimatedGIF.h:278: note: this is the location of the previous definition
#define INTELSHORT(p) (*(uint16_t *)p)

In file included from src/core/display.cpp:1586:
.pio/libdeps/CYD-2432S028/PNGdec/src/PNGdec.h:210: warning: "INTELLONG" redefined
#define INTELLONG(p) ((p) + ((p+1)<<8) + ((p+2)<<16) + ((p+3)<<24))

In file included from src/core/display.h:25,
from src/core/display.cpp:1:
.pio/libdeps/CYD-2432S028/AnimatedGIF/src/AnimatedGIF.h:279: note: this is the location of the previous definition
#define INTELLONG(p) (*(uint32_t *)p)

Compiling .pio\build\CYD-2432S028\src\core\led_control.cpp.o
Compiling .pio\build\CYD-2432S028\src\core\main_menu.cpp.o
Compiling .pio\build\CYD-2432S028\src\core\massStorage.cpp.o
src/core/display.cpp: In function 'bool drawPNG(fs::FS, String, int, int, bool)':
src/core/display.cpp:1630:79: error: invalid conversion from 'void ()(PNGDRAW)' {aka 'void ()(png_draw_tag)'} to 'int ()(PNGDRAW)' {aka 'int ()(png_draw_tag)'} [-fpermissive]
int16_t rc = png->open(filename.c_str(), myOpen, myClose, myRead, mySeek, PNGDraw);
^~~~~~~
In file included from src/core/display.cpp:1586:
.pio/libdeps/CYD-2432S028/PNGdec/src/PNGdec.h:167:171: note: initializing argument 6 of 'int PNG::open(const char*, void* ()(const char, int32_t*), void ()(void), int32_t ()(PNGFILE, uint8_t*, int32_t), int32_t ()(PNGFILE, int32_t), int ()(PNGDRAW))'
int open(const char *szFilename, PNG_OPEN_CALLBACK *pfnOpen, PNG_CLOSE_CALLBACK *pfnClose, PNG_READ_CALLBACK *pfnRead, PNG_SEEK_CALLBACK *pfnSeek, PNG_DRAW_CALLBACK *pfnDraw);
~~~~~~~~~~~~~~~~~~~^~~~~~~
Compiling .pio\build\CYD-2432S028\src\core\menu_items\BleMenu.cpp.o
Compiling .pio\build\CYD-2432S028\src\core\menu_items\ClockMenu.cpp.o
Compiling .pio\build\CYD-2432S028\src\core\menu_items\ConfigMenu.cpp.o
Compiling .pio\build\CYD-2432S028\src\core\menu_items\ConnectMenu.cpp.o
*** [.pio\build\CYD-2432S028\src\core\display.cpp.o] Error 1
In file included from src/core/led_control.cpp:1:
src/core/led_control.h:7:10: fatal error: FastLED.h: No such file or directory



#include <FastLED.h>
^~~~~~~~~~~
compilation terminated.
*** [.pio\build\CYD-2432S028\src\core\led_control.cpp.o] Error 1
In file included from src/core/menu_items/ConfigMenu.cpp:8:
src/core/led_control.h:7:10: fatal error: FastLED.h: No such file or directory



#include <FastLED.h>
^~~~~~~~~~~
compilation terminated.
*** [.pio\build\CYD-2432S028\src\core\menu_items\ConfigMenu.cpp.o] Error 1
In file included from src/core/menu_items/BleMenu.cpp:6:
src/modules/ble/ble_spam.h:9:131: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
void ibeacon(char* DeviceName="Bruce iBeacon", char* BEACON_UUID="8ec76ea3-6668-48da-9866-75be8bc86f4d", int ManufacturerId=0x4C00);
^
src/modules/ble/ble_spam.h:9:131: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
src/core/menu_items/BleMenu.cpp: In lambda function:
src/core/menu_items/BleMenu.cpp:26:51: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
options.push_back({"iBeacon", = { ibeacon(); }});
^
src/core/menu_items/BleMenu.cpp:26:51: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
===================================================================================================================== [FAILED] Took 67.44 seconds =====================================================================================================================

Environment Status Duration


CYD-2432S028 FAILED 00:01:07.438
================================================================================================================ 1 failed, 0 succeeded in 00:01:07.438 ================================================================================================================

  • The terminal process "C:\Users\admin.platformio\penv\Scripts\platformio.exe 'run', '--environment', 'CYD-2432S028'" terminated with exit code: 1.
  • Terminal will be reused by tasks, press any key to close it.
    `

@bmorcelli
Copy link
Collaborator

Compiling .pio\build\CYD-2432S028\src\core\massStorage.cpp.o
src/core/display.cpp: In function 'bool drawPNG(fs::FS, String, int, int, bool)':
src/core/display.cpp:1630:79: error: invalid conversion from 'void ()(PNGDRAW)' {aka 'void ()(png_draw_tag)'} to 'int ()(PNGDRAW)' {aka 'int ()(png_draw_tag)'} [-fpermissive]
int16_t rc = png->open(filename.c_str(), myOpen, myClose, myRead, mySeek, PNGDraw);
^~~~~~~
In file included from src/core/display.cpp:1586:
.pio/libdeps/CYD

Sync your repo to mainstream, and pull the last code version to fix this issue

#include <FastLED.h>
^~~~~~~~~~~
compilation terminated.
*** [.pio\build\CYD-2432S028\src\core\led_control.cpp.o] Error 1
In file included from src/core/menu_items/ConfigMenu.cpp:8:
src/core/led_control.h:7:10: fatal error: FastLED.h: No such file or directory

You enabled the LED interface for this device, so you need to add the library in this file line

Make it like this

lib_deps =
	${env.lib_deps}
	fastled/FastLED @3.9.4

Before compile, delete the whole .pio folder inside the project, to make sure it downloads the latest version of the libraries

@timenetworks
Copy link
Contributor Author

Compiling .pio\build\CYD-2432S028\src\core\massStorage.cpp.o
src/core/display.cpp: In function 'bool drawPNG(fs::FS, String, int, int, bool)':
src/core/display.cpp:1630:79: error: invalid conversion from 'void ()(PNGDRAW)' {aka 'void ()(png_draw_tag)'} to 'int ()(PNGDRAW)' {aka 'int ()(png_draw_tag)'} [-fpermissive]
int16_t rc = png->open(filename.c_str(), myOpen, myClose, myRead, mySeek, PNGDraw);
^~~~~~~
In file included from src/core/display.cpp:1586:
.pio/libdeps/CYD

Sync your repo to mainstream, and pull the last code version to fix this issue

#include <FastLED.h>
^~~~~~~~~~~
compilation terminated.
*** [.pio\build\CYD-2432S028\src\core\led_control.cpp.o] Error 1
In file included from src/core/menu_items/ConfigMenu.cpp:8:
src/core/led_control.h:7:10: fatal error: FastLED.h: No such file or directory

You enabled the LED interface for this device, so you need to add the library in this file line

Make it like this

lib_deps =
	${env.lib_deps}
	fastled/FastLED @3.9.4

Before compile, delete the whole .pio folder inside the project, to make sure it downloads the latest version of the libraries

can you just enable speaker on pin 26 and remove color inversion for cyds?

@bmorcelli
Copy link
Collaborator

Color inversion you can set on Config>Ui Color> Inverted Color

I will try to test this speaker thing, not sure if it will work

@timenetworks
Copy link
Contributor Author

Color inversion you can set on Config>Ui Color> Inverted Color
why is Color Invertion needed by default on cyds? it's very disturbing

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