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

[P118] Make CS pin configurable, some refactoring #3889

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
7ac8348
[P118] Make CS pin configurable, resolve some compiler warnings
tonhuisman Dec 27, 2021
276f453
Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into …
tonhuisman Dec 27, 2021
3c7583f
Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into …
tonhuisman Dec 27, 2021
08daa62
[P118] Restructure using Plugin_data_struct, allow 3 simultaneous ins…
tonhuisman Dec 27, 2021
c2b7a8c
[P118] Add library.properties and reference it
tonhuisman Dec 27, 2021
b226800
[P118] Use more descriptive names for a few variables/constants
tonhuisman Dec 28, 2021
cba7800
[P118] Fix missing #define
tonhuisman Dec 28, 2021
2690fd8
[Build] Fix compiler warnings
tonhuisman Dec 28, 2021
b6900f5
[P118] Refactor interrupt handling
tonhuisman Dec 28, 2021
8cc7f6f
Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into …
tonhuisman Jan 3, 2022
82eba3b
[P118] Attempt to avoid startup crash
tonhuisman Jan 3, 2022
0512048
Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into …
tonhuisman Jan 8, 2022
12c86e0
[P118] Attempt to avoid startup crash
tonhuisman Jan 8, 2022
eeb655d
[P118] Add entry to Custom-sample.h
tonhuisman Jan 8, 2022
174dee8
[P118] Reformat CC1101 library using Uncrustify
tonhuisman Jan 8, 2022
6264866
Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into …
tonhuisman Jan 14, 2022
de280fa
Merge branch 'mega' into feature/P118-select-cs-and-refactoring
tonhuisman Jan 21, 2022
d748bc8
Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into …
tonhuisman Jan 23, 2022
26ad49f
Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into …
tonhuisman Feb 8, 2022
4874629
Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into …
tonhuisman Feb 11, 2022
942f9ab
[P118] Log optimization
tonhuisman Feb 11, 2022
d0df92e
Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into …
tonhuisman Feb 18, 2022
fe46e96
Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into …
tonhuisman Apr 1, 2022
b3aaec4
Merge branch 'mega' into feature/P118-select-cs-and-refactoring
tonhuisman Apr 15, 2022
8a18933
Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into …
tonhuisman Apr 22, 2022
b513436
Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into …
tonhuisman May 4, 2022
a723612
Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into …
tonhuisman May 9, 2022
7434bce
Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into …
tonhuisman Jun 4, 2022
cb261f5
Merge branch 'mega' into feature/P118-select-cs-and-refactoring
tonhuisman Jun 11, 2022
1ee4f86
Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into …
tonhuisman Jun 16, 2022
2965de3
[P118] Code optimizations
tonhuisman Jun 16, 2022
0ade4a5
Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into …
tonhuisman Jun 21, 2022
6981e46
[P118] Minor code optimizations
tonhuisman Jun 21, 2022
1cdfe91
Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into …
tonhuisman Aug 5, 2022
653ed99
Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into …
tonhuisman Aug 10, 2022
1d499c4
[P118] Itho library limit formerly endless loops to max. 3 seconds
tonhuisman Aug 10, 2022
3e45502
[P118] Fix bugs found during testing, rename variables, clean up source
tonhuisman Aug 10, 2022
0c7ccee
[P118] Update documentation
tonhuisman Aug 10, 2022
60c0153
[P118] Fix bugs found during testing, rename variables, clean up source
tonhuisman Aug 10, 2022
7a8e88f
Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into …
tonhuisman Aug 11, 2022
5f591ce
[P118] Fix ESP32 support, shorten lib time-out, improve Devices overv…
tonhuisman Aug 11, 2022
b04e938
[Devices] Fine-tune display of custom GPIO configuration
tonhuisman Aug 11, 2022
0ec4593
[P116] Add Devices list GPIO overview
tonhuisman Aug 11, 2022
70b4e23
[P118] [Build] Restore Itho communication in ESP32 builds
tonhuisman Aug 11, 2022
e28e52c
[Build] Remove NeoPixel plugins from DISPLAY builds
tonhuisman Aug 11, 2022
e12e447
Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into …
tonhuisman Aug 12, 2022
da9cdda
Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into …
tonhuisman Aug 18, 2022
61c1f2b
[Itho Lib] Merge Orcon functions from #4099
tonhuisman Aug 18, 2022
62a9b0b
[P118] Merge Orcon functions from #4099
tonhuisman Aug 18, 2022
84886d0
[P118] Update documentation with Orcon commands
tonhuisman Aug 18, 2022
432c9eb
[P118] Move plugin to `Collection E` to make the build fit in again
tonhuisman Aug 18, 2022
d779c75
Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into …
tonhuisman Aug 19, 2022
71fd31c
[Itho Lib] Code improvements as suggested (mostly)
tonhuisman Aug 19, 2022
e05e58f
Merge branch 'mega' into feature/P118-select-cs-and-refactoring
tonhuisman Aug 24, 2022
8848f34
Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into …
tonhuisman Sep 14, 2022
5dfdb2f
[P118] Fix LOG_LEVEL_DEBUG compilation
tonhuisman Sep 14, 2022
1929bf9
[P118] Hide Debug log option from UI when not available, small improv…
tonhuisman Sep 18, 2022
83c8236
Merge branch 'mega' into feature/P118-select-cs-and-refactoring
TD-er Sep 19, 2022
11dd88f
Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into …
tonhuisman Sep 23, 2022
d29d6ae
[Build] Add CLIMATE configuration and move P118 there with all climat…
tonhuisman Sep 23, 2022
f3fcf92
[Docs] Update documentation for CLIMATE builds, fix some errors in do…
tonhuisman Sep 23, 2022
7d1eafa
[Build] Fix compiler warnings for signed/unsigned int compare
tonhuisman Sep 23, 2022
132e331
Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into …
tonhuisman Oct 13, 2022
5b71f12
Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into …
tonhuisman Oct 14, 2022
2b7267a
Merge branch 'mega' into feature/P118-select-cs-and-refactoring
tonhuisman Oct 16, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/Itho/CC1101.h
Expand Up @@ -168,7 +168,7 @@ class CC1101

//functions
public:
CC1101(int8_t CSpin = SS);
CC1101(int8_t CSpin = PIN_SPI_SS);
~CC1101();

//spi
Expand All @@ -195,7 +195,7 @@ class CC1101
void select(void);
void deselect(void);

int8_t _CSpin = SS;
int8_t _CSpin = PIN_SPI_SS;

protected:
uint8_t readRegister(uint8_t address);
Expand Down
2 changes: 1 addition & 1 deletion lib/Itho/IthoCC1101.h
Expand Up @@ -59,7 +59,7 @@ class IthoCC1101 : protected CC1101

//functions
public:
IthoCC1101(int8_t CSpin = SS, uint8_t counter = 0, uint8_t sendTries = 3); //set initial counter value
IthoCC1101(int8_t CSpin = PIN_SPI_SS, uint8_t counter = 0, uint8_t sendTries = 3); //set initial counter value
~IthoCC1101();

//init
Expand Down
12 changes: 6 additions & 6 deletions src/_P118_Itho.ino
Expand Up @@ -124,10 +124,10 @@ boolean Plugin_118(uint8_t function, struct EventStruct *event, String& string)
break;
}

case PLUGIN_SET_DEFAULTS: // Set defaults address to the one used in old versions of the library for backwards compatability
case PLUGIN_SET_DEFAULTS: // Set defaults address to the one used in old versions of the library for backwards compatability
{
PIN(0) = -1; // Interrupt pin undefined by default
PIN(1) = 15; // CS pin use the previous default of SS/gpio 15
PIN(0) = -1; // Interrupt pin undefined by default
PIN(1) = PIN_SPI_SS; // CS pin use the previous default of PIN_SPI_SS/gpio 15
tonhuisman marked this conversation as resolved.
Show resolved Hide resolved
PCONFIG(0) = 1;
PCONFIG(1) = 10;
PCONFIG(2) = 87;
Expand Down Expand Up @@ -236,7 +236,7 @@ boolean Plugin_118(uint8_t function, struct EventStruct *event, String& string)
{
int8_t offset = -1;

// Find matching interrupt flag
// Find matching interrupt flag
for (uint8_t i = 0; i < P118_INTERUPT_HANDLER_COUNT && offset == -1; i++) {
if (PLUGIN_118_Task[i] == event->TaskIndex) {
tonhuisman marked this conversation as resolved.
Show resolved Hide resolved
offset = i;
Expand Down Expand Up @@ -281,7 +281,7 @@ boolean Plugin_118(uint8_t function, struct EventStruct *event, String& string)

case PLUGIN_WEBFORM_LOAD:
{
PLUGIN__ExtraSettingsStruct PLUGIN_118_ExtraSettings;
PLUGIN_118_ExtraSettingsStruct PLUGIN_118_ExtraSettings;
LoadCustomTaskSettings(event->TaskIndex, (byte *)&PLUGIN_118_ExtraSettings, sizeof(PLUGIN_118_ExtraSettings));
addFormSubHeader(F("Remote RF Controls"));
addFormTextBox(F("Unit ID remote 1"), F("PLUGIN_118_ID1"), PLUGIN_118_ExtraSettings.ID1, 8);
Expand All @@ -300,7 +300,7 @@ boolean Plugin_118(uint8_t function, struct EventStruct *event, String& string)

case PLUGIN_WEBFORM_SAVE:
{
PLUGIN__ExtraSettingsStruct PLUGIN_118_ExtraSettings;
PLUGIN_118_ExtraSettingsStruct PLUGIN_118_ExtraSettings;
strcpy(PLUGIN_118_ExtraSettings.ID1, web_server.arg(F("PLUGIN_118_ID1")).c_str());
strcpy(PLUGIN_118_ExtraSettings.ID2, web_server.arg(F("PLUGIN_118_ID2")).c_str());
strcpy(PLUGIN_118_ExtraSettings.ID3, web_server.arg(F("PLUGIN_118_ID3")).c_str());
Expand Down
4 changes: 2 additions & 2 deletions src/src/PluginStructs/P118_data_struct.h
Expand Up @@ -20,7 +20,7 @@
# define PLUGIN_118_Time3 30 * 60

// This extra settings struct is needed because the default settingsstruct doesn't support strings
struct PLUGIN__ExtraSettingsStruct {
struct PLUGIN_118_ExtraSettingsStruct {
char ID1[9];
char ID2[9];
char ID3[9];
Expand Down Expand Up @@ -65,7 +65,7 @@ struct P118_data_struct : public PluginTaskData_base {
bool PLUGIN_118_InitRunned = false;
bool PLUGIN_118_Log = false;

PLUGIN__ExtraSettingsStruct PLUGIN_118_ExtraSettings;
PLUGIN_118_ExtraSettingsStruct PLUGIN_118_ExtraSettings;
};
#endif // ifdef USES_P118
#endif // ifndef PLUGINSTRUCTS_P118_DATA_STRUCT_H