mirror of
https://github.com/thelsing/knx.git
synced 2025-01-21 00:05:43 +01:00
move more code from demo to knx-esp
This commit is contained in:
parent
e99a001ac7
commit
809de53cc8
88
examples/knx-esp-demo.ino
Normal file
88
examples/knx-esp-demo.ino
Normal file
@ -0,0 +1,88 @@
|
||||
#include <EEPROM.h>
|
||||
#include "knx_esp.h"
|
||||
|
||||
float currentValue = 0;
|
||||
float maxValue = 0;
|
||||
float minValue = RAND_MAX;
|
||||
long lastsend = 0;
|
||||
|
||||
GroupObject groupObjects[]
|
||||
{
|
||||
GroupObject(2),
|
||||
GroupObject(2),
|
||||
GroupObject(2),
|
||||
GroupObject(1)
|
||||
};
|
||||
|
||||
GroupObject& goCurrent = groupObjects[0];
|
||||
GroupObject& goMax = groupObjects[1];
|
||||
GroupObject& goMin = groupObjects[2];
|
||||
GroupObject& goReset = groupObjects[3];
|
||||
|
||||
void measureTemp()
|
||||
{
|
||||
long now = millis();
|
||||
if ((now - lastsend) < 2000)
|
||||
return;
|
||||
|
||||
lastsend = now;
|
||||
int r = rand();
|
||||
currentValue = (r * 1.0) / (RAND_MAX * 1.0);
|
||||
currentValue *= 100 * 100;
|
||||
|
||||
goCurrent.objectWriteFloat(currentValue);
|
||||
|
||||
if (currentValue > maxValue)
|
||||
{
|
||||
maxValue = currentValue;
|
||||
goMax.objectWriteFloat(maxValue);
|
||||
}
|
||||
|
||||
if (currentValue < minValue)
|
||||
{
|
||||
minValue = currentValue;
|
||||
goMin.objectWriteFloat(minValue);
|
||||
}
|
||||
}
|
||||
|
||||
void resetCallback(GroupObject& go)
|
||||
{
|
||||
if (go.objectReadBool())
|
||||
{
|
||||
maxValue = 0;
|
||||
minValue = 10000;
|
||||
}
|
||||
}
|
||||
|
||||
void setup()
|
||||
{
|
||||
Serial.begin(115200);
|
||||
Serial.setDebugOutput(true);
|
||||
|
||||
randomSeed(millis());
|
||||
|
||||
knx.registerGroupObjects(groupObjects, 4);
|
||||
knx.readMemory();
|
||||
|
||||
goReset.updateHandler = resetCallback;
|
||||
|
||||
if (knx.configured())
|
||||
{
|
||||
Serial.printf("Timeout: %d\n", knx.paramByte(0));
|
||||
Serial.printf("Zykl. senden: %d\n", knx.paramByte(1));
|
||||
Serial.printf("Min/Max senden: %d\n", knx.paramByte(2));
|
||||
Serial.printf("Aenderung senden: %d\n", knx.paramByte(3));
|
||||
Serial.printf("Abgleich %d\n", knx.paramByte(4));
|
||||
}
|
||||
|
||||
knx.start();
|
||||
}
|
||||
|
||||
void loop()
|
||||
{
|
||||
knx.loop();
|
||||
if (!knx.configured())
|
||||
return;
|
||||
|
||||
measureTemp();
|
||||
}
|
133
examples/knx-esp-demo.xml
Normal file
133
examples/knx-esp-demo.xml
Normal file
@ -0,0 +1,133 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<KNX xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" CreatedBy="KNX MT" ToolVersion="5.6.407.26745" xmlns="http://knx.org/xml/project/11">
|
||||
<ManufacturerData>
|
||||
<Manufacturer RefId="M-00FA">
|
||||
<Catalog>
|
||||
<CatalogSection Id="M-00FA_CS-1" Name="Geräte" Number="1" DefaultLanguage="en-US">
|
||||
<CatalogItem Id="M-00FA_H-0123-0_HP-ABCD-78-0000_CI-IA4312-1" Name="Temperatursensor" Number="1" ProductRefId="M-00FA_H-0123-0_P-IA4312" Hardware2ProgramRefId="M-00FA_H-0123-0_HP-ABCD-78-0000" DefaultLanguage="en-US" />
|
||||
</CatalogSection>
|
||||
</Catalog>
|
||||
<ApplicationPrograms>
|
||||
<ApplicationProgram Id="M-00FA_A-ABCD-78-0000" ApplicationNumber="43981" ApplicationVersion="120" ProgramType="ApplicationProgram" MaskVersion="MV-57B0" Name="TK TEMP" LoadProcedureStyle="MergedProcedure" PeiType="0" DefaultLanguage="en-US" DynamicTableManagement="false" Linkable="false" MinEtsVersion="4.0">
|
||||
<Static>
|
||||
<Code>
|
||||
<RelativeSegment Id="M-00FA_A-ABCD-78-0000_RS-04-00000" Name="Parameters" Offset="0" Size="8" LoadStateMachine="4" />
|
||||
</Code>
|
||||
<ParameterTypes>
|
||||
<ParameterType Id="M-00FA_A-ABCD-78-0000_PT-startupTimeout" Name="startupTimeout">
|
||||
<TypeRestriction Base="Value" SizeInBit="8">
|
||||
<Enumeration Text="0 s" Value="0" Id="M-00FA_A-ABCD-78-0000_PT-startupTimeout_EN-0" />
|
||||
<Enumeration Text="1 s" Value="1" Id="M-00FA_A-ABCD-78-0000_PT-startupTimeout_EN-1" />
|
||||
<Enumeration Text="2 s" Value="2" Id="M-00FA_A-ABCD-78-0000_PT-startupTimeout_EN-2" />
|
||||
<Enumeration Text="3 s" Value="3" Id="M-00FA_A-ABCD-78-0000_PT-startupTimeout_EN-3" />
|
||||
<Enumeration Text="4 s" Value="4" Id="M-00FA_A-ABCD-78-0000_PT-startupTimeout_EN-4" />
|
||||
<Enumeration Text="5 s" Value="5" Id="M-00FA_A-ABCD-78-0000_PT-startupTimeout_EN-5" />
|
||||
<Enumeration Text="6 s" Value="6" Id="M-00FA_A-ABCD-78-0000_PT-startupTimeout_EN-6" />
|
||||
</TypeRestriction>
|
||||
</ParameterType>
|
||||
<ParameterType Id="M-00FA_A-ABCD-78-0000_PT-TempChange" Name="TempChange">
|
||||
<TypeRestriction Base="Value" SizeInBit="8">
|
||||
<Enumeration Text="Disabled" Value="0" Id="M-00FA_A-ABCD-78-0000_PT-TempChange_EN-0" />
|
||||
<Enumeration Text="0.1 K" Value="1" Id="M-00FA_A-ABCD-78-0000_PT-TempChange_EN-1" />
|
||||
<Enumeration Text="0.2 K" Value="2" Id="M-00FA_A-ABCD-78-0000_PT-TempChange_EN-2" />
|
||||
<Enumeration Text="0.3 K" Value="3" Id="M-00FA_A-ABCD-78-0000_PT-TempChange_EN-3" />
|
||||
</TypeRestriction>
|
||||
</ParameterType>
|
||||
<ParameterType Id="M-00FA_A-ABCD-78-0000_PT-TempCycle" Name="TempCycle">
|
||||
<TypeRestriction Base="Value" SizeInBit="8">
|
||||
<Enumeration Text="Disabled" Value="0" Id="M-00FA_A-ABCD-78-0000_PT-TempCycle_EN-0" />
|
||||
<Enumeration Text="1 min" Value="1" Id="M-00FA_A-ABCD-78-0000_PT-TempCycle_EN-1" />
|
||||
<Enumeration Text="2 min" Value="2" Id="M-00FA_A-ABCD-78-0000_PT-TempCycle_EN-2" />
|
||||
<Enumeration Text="3 min" Value="3" Id="M-00FA_A-ABCD-78-0000_PT-TempCycle_EN-3" />
|
||||
</TypeRestriction>
|
||||
</ParameterType>
|
||||
<ParameterType Id="M-00FA_A-ABCD-78-0000_PT-TempAbgleich" Name="TempAbgleich">
|
||||
<TypeNumber SizeInBit="32" Type="signedInt" minInclusive="-50" maxInclusive="50" />
|
||||
</ParameterType>
|
||||
<ParameterType Id="M-00FA_A-ABCD-78-0000_PT-TempSendMinMax" Name="TempSendMinMax">
|
||||
<TypeRestriction Base="Value" SizeInBit="8">
|
||||
<Enumeration Text="Disabled" Value="0" Id="M-00FA_A-ABCD-78-0000_PT-TempSendMinMax_EN-0" />
|
||||
<Enumeration Text="Send Enable" Value="1" Id="M-00FA_A-ABCD-78-0000_PT-TempSendMinMax_EN-1" />
|
||||
</TypeRestriction>
|
||||
</ParameterType>
|
||||
</ParameterTypes>
|
||||
<Parameters>
|
||||
<Parameter Id="M-00FA_A-ABCD-78-0000_P-1" Name="startupTimeout" ParameterType="M-00FA_A-ABCD-78-0000_PT-startupTimeout" Text="Startup delaytime" Value="0">
|
||||
<Memory CodeSegment="M-00FA_A-ABCD-78-0000_RS-04-00000" Offset="0" BitOffset="0" />
|
||||
</Parameter>
|
||||
<Parameter Id="M-00FA_A-ABCD-78-0000_P-2" Name="Aender Senden" ParameterType="M-00FA_A-ABCD-78-0000_PT-TempChange" Text="Send actual value after change of" Value="0">
|
||||
<Memory CodeSegment="M-00FA_A-ABCD-78-0000_RS-04-00000" Offset="1" BitOffset="0" />
|
||||
</Parameter>
|
||||
<Parameter Id="M-00FA_A-ABCD-78-0000_P-3" Name="ZyklSenden" ParameterType="M-00FA_A-ABCD-78-0000_PT-TempCycle" Text="Send actual temperature cyclically" Value="0">
|
||||
<Memory CodeSegment="M-00FA_A-ABCD-78-0000_RS-04-00000" Offset="2" BitOffset="0" />
|
||||
</Parameter>
|
||||
<Parameter Id="M-00FA_A-ABCD-78-0000_P-4" Name="MinMaxSenden" ParameterType="M-00FA_A-ABCD-78-0000_PT-TempSendMinMax" Text="Send min/max value" Value="0">
|
||||
<Memory CodeSegment="M-00FA_A-ABCD-78-0000_RS-04-00000" Offset="3" BitOffset="0" />
|
||||
</Parameter>
|
||||
<Parameter Id="M-00FA_A-ABCD-78-0000_P-5" Name="Abgleich" ParameterType="M-00FA_A-ABCD-78-0000_PT-TempAbgleich" Text="Internal sensor correction value (value * 0.1 K)" Value="0">
|
||||
<Memory CodeSegment="M-00FA_A-ABCD-78-0000_RS-04-00000" Offset="4" BitOffset="0" />
|
||||
</Parameter>
|
||||
</Parameters>
|
||||
<ParameterRefs>
|
||||
<ParameterRef Id="M-00FA_A-ABCD-78-0000_P-1_R-1" RefId="M-00FA_A-ABCD-78-0000_P-1" />
|
||||
<ParameterRef Id="M-00FA_A-ABCD-78-0000_P-2_R-2" RefId="M-00FA_A-ABCD-78-0000_P-2" />
|
||||
<ParameterRef Id="M-00FA_A-ABCD-78-0000_P-3_R-3" RefId="M-00FA_A-ABCD-78-0000_P-3" />
|
||||
<ParameterRef Id="M-00FA_A-ABCD-78-0000_P-4_R-4" RefId="M-00FA_A-ABCD-78-0000_P-4" />
|
||||
<ParameterRef Id="M-00FA_A-ABCD-78-0000_P-5_R-5" RefId="M-00FA_A-ABCD-78-0000_P-5" />
|
||||
</ParameterRefs>
|
||||
<ComObjectTable>
|
||||
<ComObject Id="M-00FA_A-ABCD-78-0000_O-1" Name="Current temperature value" Text="Current temperature value" Number="1" FunctionText="Transmit temperature value" ObjectSize="2 Bytes" ReadFlag="Enabled" WriteFlag="Disabled" CommunicationFlag="Enabled" TransmitFlag="Enabled" UpdateFlag="Disabled" ReadOnInitFlag="Disabled" DatapointType="" />
|
||||
<ComObject Id="M-00FA_A-ABCD-78-0000_O-2" Name="Max memory value" Text="Max memory value" Number="2" FunctionText="Read memory" ObjectSize="2 Bytes" ReadFlag="Enabled" WriteFlag="Disabled" CommunicationFlag="Enabled" TransmitFlag="Enabled" UpdateFlag="Disabled" ReadOnInitFlag="Disabled" DatapointType="" />
|
||||
<ComObject Id="M-00FA_A-ABCD-78-0000_O-3" Name="Min memory value" Text="Min memory value" Number="3" FunctionText="Read memory" ObjectSize="2 Bytes" ReadFlag="Enabled" WriteFlag="Disabled" CommunicationFlag="Enabled" TransmitFlag="Enabled" UpdateFlag="Disabled" ReadOnInitFlag="Disabled" DatapointType="" />
|
||||
<ComObject Id="M-00FA_A-ABCD-78-0000_O-4" Name="Min/max memory reseet" Text="Min/max memory reseet" Number="4" FunctionText="Reset memory" ObjectSize="1 Bit" ReadFlag="Disabled" WriteFlag="Enabled" CommunicationFlag="Enabled" TransmitFlag="Disabled" UpdateFlag="Disabled" ReadOnInitFlag="Disabled" DatapointType="" />
|
||||
</ComObjectTable>
|
||||
<ComObjectRefs>
|
||||
<ComObjectRef Id="M-00FA_A-ABCD-78-0000_O-1_R-1" RefId="M-00FA_A-ABCD-78-0000_O-1" />
|
||||
<ComObjectRef Id="M-00FA_A-ABCD-78-0000_O-2_R-2" RefId="M-00FA_A-ABCD-78-0000_O-2" />
|
||||
<ComObjectRef Id="M-00FA_A-ABCD-78-0000_O-3_R-3" RefId="M-00FA_A-ABCD-78-0000_O-3" />
|
||||
<ComObjectRef Id="M-00FA_A-ABCD-78-0000_O-4_R-4" RefId="M-00FA_A-ABCD-78-0000_O-4" />
|
||||
</ComObjectRefs>
|
||||
<AddressTable MaxEntries="65000" />
|
||||
<AssociationTable MaxEntries="65000" />
|
||||
<LoadProcedures>
|
||||
<LoadProcedure MergeId="2">
|
||||
<LdCtrlRelSegment AppliesTo="full" LsmIdx="4" Size="8" Mode="0" Fill="0" />
|
||||
</LoadProcedure>
|
||||
<LoadProcedure MergeId="4">
|
||||
<LdCtrlWriteRelMem ObjIdx="4" Offset="0" Size="8" Verify="true" />
|
||||
</LoadProcedure>
|
||||
</LoadProcedures>
|
||||
<Options />
|
||||
</Static>
|
||||
<Dynamic>
|
||||
<ChannelIndependentBlock>
|
||||
<ParameterBlock Id="M-00FA_A-ABCD-78-0000_PB-1" Name="ParameterPage" Text="Allgemeine Parameter">
|
||||
<ParameterRefRef RefId="M-00FA_A-ABCD-78-0000_P-1_R-1" />
|
||||
<ParameterRefRef RefId="M-00FA_A-ABCD-78-0000_P-2_R-2" />
|
||||
<ParameterRefRef RefId="M-00FA_A-ABCD-78-0000_P-3_R-3" />
|
||||
<ParameterRefRef RefId="M-00FA_A-ABCD-78-0000_P-4_R-4" />
|
||||
<ParameterRefRef RefId="M-00FA_A-ABCD-78-0000_P-5_R-5" />
|
||||
<ComObjectRefRef RefId="M-00FA_A-ABCD-78-0000_O-1_R-1" />
|
||||
<ComObjectRefRef RefId="M-00FA_A-ABCD-78-0000_O-2_R-2" />
|
||||
<ComObjectRefRef RefId="M-00FA_A-ABCD-78-0000_O-3_R-3" />
|
||||
<ComObjectRefRef RefId="M-00FA_A-ABCD-78-0000_O-4_R-4" />
|
||||
</ParameterBlock>
|
||||
</ChannelIndependentBlock>
|
||||
</Dynamic>
|
||||
</ApplicationProgram>
|
||||
</ApplicationPrograms>
|
||||
<Hardware>
|
||||
<Hardware Id="M-00FA_H-0123-0" Name="ESP8266 Random" SerialNumber="0123" VersionNumber="0" HasIndividualAddress="true" HasApplicationProgram="true" IsIPEnabled="true">
|
||||
<Products>
|
||||
<Product Id="M-00FA_H-0123-0_P-IA4312" Text="Temperatursensor" OrderNumber="IA4312" IsRailMounted="false" DefaultLanguage="en-US" />
|
||||
</Products>
|
||||
<Hardware2Programs>
|
||||
<Hardware2Program Id="M-00FA_H-0123-0_HP-ABCD-78-0000" MediumTypes="MT-5">
|
||||
<ApplicationProgramRef RefId="M-00FA_A-ABCD-78-0000" />
|
||||
</Hardware2Program>
|
||||
</Hardware2Programs>
|
||||
</Hardware>
|
||||
</Hardware>
|
||||
</Manufacturer>
|
||||
</ManufacturerData>
|
||||
</KNX>
|
119
knx-esp.vcxitems
119
knx-esp.vcxitems
@ -15,62 +15,75 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Text Include="$(MSBuildThisFileDirectory)library.properties" />
|
||||
<Text Include="$(MSBuildThisFileDirectory)knx_esp.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<!-- <ClInclude Include="$(MSBuildThisFileDirectory)knx_esp.h" /> -->
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)address_table_object.h" />
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)apdu.h" />
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)application_layer.h" />
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)application_program_object.h" />
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)association_table_object.h" />
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)bau.h" />
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)bau57B0.h" />
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)bits.h" />
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)cemi_frame.h" />
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)datapoint_types.h" />
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)data_link_layer.h" />
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)device_object.h" />
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)esp_platform.h" />
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)group_object.h" />
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)group_object_table_object.h" />
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)interface_object.h" />
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)ip_parameter_object.h" />
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)knx_facade.h" />
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)knx_types.h" />
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)memory.h" />
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)network_layer.h" />
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)npdu.h" />
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)platform.h" />
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)property_types.h" />
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)save_restore.h" />
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)table_object.h" />
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)tpdu.h" />
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)transport_layer.h" />
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)src\button.h" />
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)src\esp_platform.h" />
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)src\knx\address_table_object.h" />
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)src\knx\apdu.h" />
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)src\knx\application_layer.h" />
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)src\knx\application_program_object.h" />
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)src\knx\association_table_object.h" />
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)src\knx\bau.h" />
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)src\knx\bau57B0.h" />
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)src\knx\bits.h" />
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)src\knx\cemi_frame.h" />
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)src\knx\datapoint_types.h" />
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)src\knx\data_link_layer.h" />
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)src\knx\device_object.h" />
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)src\knx\group_object.h" />
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)src\knx\group_object_table_object.h" />
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)src\knx\interface_object.h" />
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)src\knx\ip_parameter_object.h" />
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)src\knx\knx_types.h" />
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)src\knx\memory.h" />
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)src\knx\network_layer.h" />
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)src\knx\npdu.h" />
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)src\knx\platform.h" />
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)src\knx\property_types.h" />
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)src\knx\save_restore.h" />
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)src\knx\table_object.h" />
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)src\knx\tpdu.h" />
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)src\knx\transport_layer.h" />
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)src\knx_esp.h" />
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)src\knx_facade.h" />
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)src\led.h" />
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)src\nowifistate.h" />
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)src\programmingmodestate.h" />
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)src\runningstate.h" />
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)src\state.h" />
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)src\wpsstate.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)address_table_object.cpp" />
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)apdu.cpp" />
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)application_layer.cpp" />
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)application_program_object.cpp" />
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)association_table_object.cpp" />
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)bau.cpp" />
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)bau57B0.cpp" />
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)bits.cpp" />
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)cemi_frame.cpp" />
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)datapoint_types.cpp" />
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)data_link_layer.cpp" />
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)device_object.cpp" />
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)esp_platform.cpp" />
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)group_object.cpp" />
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)group_object_table_object.cpp" />
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)ip_parameter_object.cpp" />
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)knx_facade.cpp" />
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)memory.cpp" />
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)network_layer.cpp" />
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)npdu.cpp" />
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)table_object.cpp" />
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)tpdu.cpp" />
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)transport_layer.cpp" />
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)src\button.cpp" />
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)src\esp_platform.cpp" />
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)src\knx\address_table_object.cpp" />
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)src\knx\apdu.cpp" />
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)src\knx\application_layer.cpp" />
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)src\knx\application_program_object.cpp" />
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)src\knx\association_table_object.cpp" />
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)src\knx\bau.cpp" />
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)src\knx\bau57B0.cpp" />
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)src\knx\bits.cpp" />
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)src\knx\cemi_frame.cpp" />
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)src\knx\datapoint_types.cpp" />
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)src\knx\data_link_layer.cpp" />
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)src\knx\device_object.cpp" />
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)src\knx\group_object.cpp" />
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)src\knx\group_object_table_object.cpp" />
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)src\knx\ip_parameter_object.cpp" />
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)src\knx\memory.cpp" />
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)src\knx\network_layer.cpp" />
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)src\knx\npdu.cpp" />
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)src\knx\table_object.cpp" />
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)src\knx\tpdu.cpp" />
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)src\knx\transport_layer.cpp" />
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)src\knx_facade.cpp" />
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)src\led.cpp" />
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)src\nowifistate.cpp" />
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)src\programmingmodestate.cpp" />
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)src\runningstate.cpp" />
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)src\state.cpp" />
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)src\wpsstate.cpp" />
|
||||
</ItemGroup>
|
||||
</Project>
|
@ -9,168 +9,216 @@
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)address_table_object.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)apdu.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)application_layer.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)application_program_object.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)association_table_object.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)bau.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)bau57B0.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)bits.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)cemi_frame.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)data_link_layer.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)datapoint_types.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)device_object.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)esp_platform.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)group_object.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)group_object_table_object.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)ip_parameter_object.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)memory.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)network_layer.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)npdu.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)table_object.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)tpdu.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)transport_layer.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)knx_facade.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<Filter Include="Source Files\knx">
|
||||
<UniqueIdentifier>{0ee56052-c43f-46b9-ab25-f805ed81e840}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Header Files\knx">
|
||||
<UniqueIdentifier>{e0ae5c46-92be-4bc5-bcae-4e831818010c}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Text Include="$(MSBuildThisFileDirectory)library.properties" />
|
||||
<Text Include="$(MSBuildThisFileDirectory)knx_esp.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</Text>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)address_table_object.h">
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)src\esp_platform.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)apdu.h">
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)src\knx_esp.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)application_layer.h">
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)src\knx_facade.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)application_program_object.h">
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)src\knx\address_table_object.h">
|
||||
<Filter>Header Files\knx</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)src\knx\apdu.h">
|
||||
<Filter>Header Files\knx</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)src\knx\application_layer.h">
|
||||
<Filter>Header Files\knx</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)src\knx\application_program_object.h">
|
||||
<Filter>Header Files\knx</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)src\knx\association_table_object.h">
|
||||
<Filter>Header Files\knx</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)src\knx\bau.h">
|
||||
<Filter>Header Files\knx</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)src\knx\bau57B0.h">
|
||||
<Filter>Header Files\knx</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)src\knx\bits.h">
|
||||
<Filter>Header Files\knx</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)src\knx\cemi_frame.h">
|
||||
<Filter>Header Files\knx</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)src\knx\data_link_layer.h">
|
||||
<Filter>Header Files\knx</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)src\knx\datapoint_types.h">
|
||||
<Filter>Header Files\knx</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)src\knx\device_object.h">
|
||||
<Filter>Header Files\knx</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)src\knx\group_object.h">
|
||||
<Filter>Header Files\knx</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)src\knx\group_object_table_object.h">
|
||||
<Filter>Header Files\knx</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)src\knx\interface_object.h">
|
||||
<Filter>Header Files\knx</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)src\knx\ip_parameter_object.h">
|
||||
<Filter>Header Files\knx</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)src\knx\knx_types.h">
|
||||
<Filter>Header Files\knx</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)src\knx\memory.h">
|
||||
<Filter>Header Files\knx</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)src\knx\network_layer.h">
|
||||
<Filter>Header Files\knx</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)src\knx\npdu.h">
|
||||
<Filter>Header Files\knx</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)src\knx\platform.h">
|
||||
<Filter>Header Files\knx</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)src\knx\property_types.h">
|
||||
<Filter>Header Files\knx</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)src\knx\save_restore.h">
|
||||
<Filter>Header Files\knx</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)src\knx\table_object.h">
|
||||
<Filter>Header Files\knx</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)src\knx\tpdu.h">
|
||||
<Filter>Header Files\knx</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)src\knx\transport_layer.h">
|
||||
<Filter>Header Files\knx</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)src\nowifistate.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)association_table_object.h">
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)src\programmingmodestate.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)bau.h">
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)src\runningstate.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)bau57B0.h">
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)src\state.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)bits.h">
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)src\wpsstate.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)cemi_frame.h">
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)src\button.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)data_link_layer.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)datapoint_types.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)device_object.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)esp_platform.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)group_object.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)group_object_table_object.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)interface_object.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)ip_parameter_object.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)knx_types.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)memory.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)network_layer.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)npdu.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)platform.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)property_types.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)save_restore.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)table_object.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)tpdu.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)transport_layer.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)knx_facade.h">
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)src\led.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)src\esp_platform.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)src\knx_facade.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)src\knx\address_table_object.cpp">
|
||||
<Filter>Source Files\knx</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)src\knx\apdu.cpp">
|
||||
<Filter>Source Files\knx</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)src\knx\application_layer.cpp">
|
||||
<Filter>Source Files\knx</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)src\knx\application_program_object.cpp">
|
||||
<Filter>Source Files\knx</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)src\knx\association_table_object.cpp">
|
||||
<Filter>Source Files\knx</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)src\knx\bau.cpp">
|
||||
<Filter>Source Files\knx</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)src\knx\bau57B0.cpp">
|
||||
<Filter>Source Files\knx</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)src\knx\bits.cpp">
|
||||
<Filter>Source Files\knx</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)src\knx\cemi_frame.cpp">
|
||||
<Filter>Source Files\knx</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)src\knx\data_link_layer.cpp">
|
||||
<Filter>Source Files\knx</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)src\knx\datapoint_types.cpp">
|
||||
<Filter>Source Files\knx</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)src\knx\device_object.cpp">
|
||||
<Filter>Source Files\knx</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)src\knx\group_object.cpp">
|
||||
<Filter>Source Files\knx</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)src\knx\group_object_table_object.cpp">
|
||||
<Filter>Source Files\knx</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)src\knx\ip_parameter_object.cpp">
|
||||
<Filter>Source Files\knx</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)src\knx\memory.cpp">
|
||||
<Filter>Source Files\knx</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)src\knx\network_layer.cpp">
|
||||
<Filter>Source Files\knx</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)src\knx\npdu.cpp">
|
||||
<Filter>Source Files\knx</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)src\knx\table_object.cpp">
|
||||
<Filter>Source Files\knx</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)src\knx\tpdu.cpp">
|
||||
<Filter>Source Files\knx</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)src\knx\transport_layer.cpp">
|
||||
<Filter>Source Files\knx</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)src\nowifistate.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)src\programmingmodestate.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)src\runningstate.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)src\state.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)src\wpsstate.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)src\button.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)src\led.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
25
src/button.cpp
Normal file
25
src/button.cpp
Normal file
@ -0,0 +1,25 @@
|
||||
#include "button.h"
|
||||
#include "state.h"
|
||||
#include "knx_facade.h"
|
||||
|
||||
unsigned long buttonTimestamp = 0;
|
||||
void buttonUp()
|
||||
{
|
||||
if (millis() - buttonTimestamp > 1000)
|
||||
{
|
||||
Serial.println("long button press");
|
||||
currentState->longButtonPress();
|
||||
}
|
||||
else
|
||||
{
|
||||
Serial.println("short button press");
|
||||
currentState->shortButtonPress();
|
||||
}
|
||||
attachInterrupt(knx.buttonPin(), buttonDown, FALLING);
|
||||
}
|
||||
|
||||
void buttonDown()
|
||||
{
|
||||
buttonTimestamp = millis();
|
||||
attachInterrupt(knx.buttonPin(), buttonUp, RISING);
|
||||
}
|
4
src/button.h
Normal file
4
src/button.h
Normal file
@ -0,0 +1,4 @@
|
||||
#pragma once
|
||||
|
||||
void buttonDown();
|
||||
void buttonUp();
|
@ -1,4 +1,8 @@
|
||||
#include "knx_facade.h"
|
||||
#include "state.h"
|
||||
#include "button.h"
|
||||
#include "led.h"
|
||||
#include "nowifistate.h"
|
||||
|
||||
KnxFacade knx;
|
||||
|
||||
@ -32,12 +36,38 @@ bool KnxFacade::configured()
|
||||
return _bau.configured();
|
||||
}
|
||||
|
||||
uint32_t KnxFacade::ledPin()
|
||||
{
|
||||
return _ledPin;
|
||||
}
|
||||
|
||||
void KnxFacade::ledPin(uint32_t value)
|
||||
{
|
||||
_ledPin = value;
|
||||
}
|
||||
|
||||
uint32_t KnxFacade::buttonPin()
|
||||
{
|
||||
return _buttonPin;
|
||||
}
|
||||
|
||||
void KnxFacade::buttonPin(uint32_t value)
|
||||
{
|
||||
_buttonPin = value;
|
||||
}
|
||||
|
||||
void KnxFacade::readMemory()
|
||||
{
|
||||
_bau.readMemory();
|
||||
}
|
||||
|
||||
void KnxFacade::loop()
|
||||
{
|
||||
if (currentState)
|
||||
currentState->loop();
|
||||
}
|
||||
|
||||
void KnxFacade::knxLoop()
|
||||
{
|
||||
_bau.loop();
|
||||
}
|
||||
@ -72,6 +102,18 @@ void KnxFacade::version(uint16_t value)
|
||||
_bau.deviceObject().version(value);
|
||||
}
|
||||
|
||||
void KnxFacade::start()
|
||||
{
|
||||
pinMode(_ledPin, OUTPUT);
|
||||
|
||||
pinMode(_buttonPin, INPUT);
|
||||
attachInterrupt(_buttonPin, buttonDown, FALLING);
|
||||
|
||||
switchToSate(noWifiState);
|
||||
checkStates();
|
||||
_ticker.attach_ms(100, doLed);
|
||||
}
|
||||
|
||||
uint8_t* KnxFacade::paramData(uint32_t addr)
|
||||
{
|
||||
if (!_bau.configured())
|
||||
|
@ -1,8 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
#include <Ticker.h>
|
||||
#include "esp_platform.h"
|
||||
#include "knx/bau57B0.h"
|
||||
|
||||
class RunningState;
|
||||
|
||||
class KnxFacade
|
||||
{
|
||||
public:
|
||||
@ -12,14 +14,20 @@ public:
|
||||
bool progMode();
|
||||
void progMode(bool value);
|
||||
bool configured();
|
||||
uint32_t ledPin();
|
||||
void ledPin(uint32_t value);
|
||||
uint32_t buttonPin();
|
||||
void buttonPin(uint32_t value);
|
||||
void readMemory();
|
||||
void loop();
|
||||
void knxLoop();
|
||||
void registerGroupObjects(GroupObject* groupObjects, uint16_t count);
|
||||
void manufacturerId(uint16_t value);
|
||||
void bauNumber(uint32_t value);
|
||||
void orderNumber(const char* value);
|
||||
void hardwareType(uint8_t* value);
|
||||
void version(uint16_t value);
|
||||
void start();
|
||||
uint8_t* paramData(uint32_t addr);
|
||||
uint8_t paramByte(uint32_t addr);
|
||||
uint16_t paramWord(uint32_t addr);
|
||||
@ -27,6 +35,9 @@ public:
|
||||
private:
|
||||
EspPlatform _platform;
|
||||
Bau57B0 _bau;
|
||||
uint32_t _ledPin = 16;
|
||||
uint32_t _buttonPin = 0;
|
||||
Ticker _ticker;
|
||||
};
|
||||
|
||||
extern KnxFacade knx;
|
28
src/led.cpp
Normal file
28
src/led.cpp
Normal file
@ -0,0 +1,28 @@
|
||||
#include "led.h"
|
||||
#include "knx_facade.h"
|
||||
#include "state.h"
|
||||
|
||||
void doLed()
|
||||
{
|
||||
if (!currentState)
|
||||
return;
|
||||
|
||||
if (!currentState->ledOn())
|
||||
{
|
||||
digitalWrite(knx.ledPin(), HIGH);
|
||||
return;
|
||||
}
|
||||
|
||||
unsigned int period = currentState->blinkPeriod();
|
||||
|
||||
if (!currentState->ledBlink() || period == 0)
|
||||
{
|
||||
digitalWrite(knx.ledPin(), LOW);
|
||||
return;
|
||||
}
|
||||
|
||||
if ((millis() % period) > (period / 2))
|
||||
digitalWrite(knx.ledPin(), HIGH);
|
||||
else
|
||||
digitalWrite(knx.ledPin(), LOW);
|
||||
}
|
35
src/nowifistate.cpp
Normal file
35
src/nowifistate.cpp
Normal file
@ -0,0 +1,35 @@
|
||||
#include <ESP8266WiFi.h>
|
||||
|
||||
#include "nowifistate.h"
|
||||
#include "wpsstate.h"
|
||||
#include "runningstate.h"
|
||||
|
||||
NoWifiState noWifiState = NoWifiState();
|
||||
|
||||
void NoWifiState::shortButtonPress()
|
||||
{
|
||||
switchToSate(wpsState);
|
||||
}
|
||||
|
||||
void NoWifiState::longButtonPress()
|
||||
{
|
||||
switchToSate(wpsState);
|
||||
}
|
||||
|
||||
void NoWifiState::enterState()
|
||||
{
|
||||
WiFi.mode(WIFI_STA);
|
||||
WiFi.begin("", "");
|
||||
while (WiFi.status() == WL_DISCONNECTED)
|
||||
{
|
||||
delay(500);
|
||||
Serial.print(".");
|
||||
}
|
||||
|
||||
wl_status_t status = WiFi.status();
|
||||
if (status == WL_CONNECTED)
|
||||
{
|
||||
Serial.printf("\nConnected successful to SSID '%s'\n", WiFi.SSID().c_str());
|
||||
switchToSate(runningState);
|
||||
}
|
||||
}
|
16
src/nowifistate.h
Normal file
16
src/nowifistate.h
Normal file
@ -0,0 +1,16 @@
|
||||
#pragma once
|
||||
|
||||
#include "state.h"
|
||||
|
||||
class NoWifiState : public State
|
||||
{
|
||||
public:
|
||||
NoWifiState() : State(true, false, 0)
|
||||
{}
|
||||
virtual void shortButtonPress();
|
||||
virtual void longButtonPress();
|
||||
virtual void enterState();
|
||||
virtual const char* name() { return "NoWifi"; }
|
||||
};
|
||||
|
||||
extern NoWifiState noWifiState;
|
26
src/programmingmodestate.cpp
Normal file
26
src/programmingmodestate.cpp
Normal file
@ -0,0 +1,26 @@
|
||||
#include "programmingmodestate.h"
|
||||
#include "runningstate.h"
|
||||
#include "knx_facade.h"
|
||||
|
||||
ProgramModeState programModeState = ProgramModeState();
|
||||
|
||||
void ProgramModeState::enterState()
|
||||
{
|
||||
knx.progMode(true);
|
||||
}
|
||||
|
||||
void ProgramModeState::leaveState()
|
||||
{
|
||||
knx.progMode(false);
|
||||
}
|
||||
|
||||
void ProgramModeState::shortButtonPress()
|
||||
{
|
||||
switchToSate(runningState);
|
||||
}
|
||||
|
||||
void ProgramModeState::loop()
|
||||
{
|
||||
State::loop();
|
||||
knx.knxLoop();
|
||||
}
|
17
src/programmingmodestate.h
Normal file
17
src/programmingmodestate.h
Normal file
@ -0,0 +1,17 @@
|
||||
#pragma once
|
||||
|
||||
#include "state.h"
|
||||
|
||||
class ProgramModeState : public State
|
||||
{
|
||||
public:
|
||||
ProgramModeState() : State(true, true, 200)
|
||||
{}
|
||||
virtual void enterState();
|
||||
virtual void leaveState();
|
||||
virtual void shortButtonPress();
|
||||
virtual void loop();
|
||||
virtual const char* name() { return "ProgramMode"; }
|
||||
};
|
||||
|
||||
extern ProgramModeState programModeState;
|
40
src/runningstate.cpp
Normal file
40
src/runningstate.cpp
Normal file
@ -0,0 +1,40 @@
|
||||
#include "runningstate.h"
|
||||
#include "programmingmodestate.h"
|
||||
#include "wpsstate.h"
|
||||
#include "knx_facade.h"
|
||||
|
||||
RunningState runningState = RunningState();
|
||||
|
||||
void RunningState::shortButtonPress()
|
||||
{
|
||||
switchToSate(programModeState);
|
||||
}
|
||||
|
||||
void RunningState::longButtonPress()
|
||||
{
|
||||
switchToSate(wpsState);
|
||||
}
|
||||
|
||||
void RunningState::enterState()
|
||||
{
|
||||
if (_initialized)
|
||||
return;
|
||||
|
||||
knx.enabled(true);
|
||||
_initialized = true;
|
||||
}
|
||||
|
||||
void RunningState::leaveState()
|
||||
{
|
||||
if (nextState != &programModeState)
|
||||
{
|
||||
_initialized = false;
|
||||
knx.enabled(false);
|
||||
}
|
||||
}
|
||||
|
||||
void RunningState::loop()
|
||||
{
|
||||
State::loop();
|
||||
knx.knxLoop();
|
||||
}
|
20
src/runningstate.h
Normal file
20
src/runningstate.h
Normal file
@ -0,0 +1,20 @@
|
||||
#pragma once
|
||||
|
||||
#include "state.h"
|
||||
|
||||
class RunningState : public State
|
||||
{
|
||||
public:
|
||||
RunningState() : State(false, false, 0)
|
||||
{}
|
||||
virtual void shortButtonPress();
|
||||
virtual void longButtonPress();
|
||||
virtual void enterState();
|
||||
virtual void leaveState();
|
||||
virtual void loop();
|
||||
virtual const char* name() { return "Running"; }
|
||||
private:
|
||||
bool _initialized = false;
|
||||
};
|
||||
|
||||
extern RunningState runningState;
|
53
src/state.cpp
Normal file
53
src/state.cpp
Normal file
@ -0,0 +1,53 @@
|
||||
#include "state.h"
|
||||
#include "Arduino.h"
|
||||
|
||||
State* volatile currentState = 0;
|
||||
State* volatile nextState = 0;
|
||||
|
||||
void switchToSate(State& state)
|
||||
{
|
||||
nextState = &state;
|
||||
}
|
||||
|
||||
void checkStates()
|
||||
{
|
||||
if (!nextState)
|
||||
return;
|
||||
|
||||
if (nextState == currentState)
|
||||
return;
|
||||
|
||||
if (currentState)
|
||||
{
|
||||
printf("Leave %s\n", currentState->name());
|
||||
currentState->leaveState();
|
||||
}
|
||||
|
||||
currentState = nextState;
|
||||
|
||||
if (currentState)
|
||||
{
|
||||
printf("Enter %s\n", currentState->name());
|
||||
currentState->enterState();
|
||||
}
|
||||
}
|
||||
|
||||
bool State::ledOn()
|
||||
{
|
||||
return _ledOn;
|
||||
}
|
||||
|
||||
bool State::ledBlink()
|
||||
{
|
||||
return _ledBlink;
|
||||
}
|
||||
|
||||
unsigned int State::blinkPeriod()
|
||||
{
|
||||
return _blinkPeriod;
|
||||
}
|
||||
|
||||
void State::loop()
|
||||
{
|
||||
checkStates();
|
||||
}
|
29
src/state.h
Normal file
29
src/state.h
Normal file
@ -0,0 +1,29 @@
|
||||
#pragma once
|
||||
|
||||
class State
|
||||
{
|
||||
public:
|
||||
State(bool led, bool blink, int period) :
|
||||
_ledOn(led), _ledBlink(blink), _blinkPeriod(period)
|
||||
{}
|
||||
virtual ~State() {}
|
||||
bool ledOn();
|
||||
bool ledBlink();
|
||||
unsigned int blinkPeriod();
|
||||
virtual void shortButtonPress() {}
|
||||
virtual void longButtonPress() {}
|
||||
virtual void enterState() {}
|
||||
virtual void leaveState() {}
|
||||
virtual void loop();
|
||||
virtual const char* name() = 0;
|
||||
private:
|
||||
bool _ledOn;
|
||||
bool _ledBlink;
|
||||
int _blinkPeriod;
|
||||
};
|
||||
|
||||
void switchToSate(State& state);
|
||||
void checkStates();
|
||||
|
||||
extern State* volatile currentState;
|
||||
extern State* volatile nextState;
|
28
src/wpsstate.cpp
Normal file
28
src/wpsstate.cpp
Normal file
@ -0,0 +1,28 @@
|
||||
#include <ESP8266WiFi.h>
|
||||
|
||||
#include "wpsstate.h"
|
||||
#include "runningstate.h"
|
||||
#include "nowifistate.h"
|
||||
|
||||
WpsState wpsState = WpsState();
|
||||
|
||||
void WpsState::enterState()
|
||||
{
|
||||
//invalidate old wifi settings first
|
||||
WiFi.begin("fobar", "a12");
|
||||
Serial.println("WPS config start");
|
||||
bool wpsSuccess = WiFi.beginWPSConfig();
|
||||
if (wpsSuccess) {
|
||||
String newSSID = WiFi.SSID();
|
||||
if (newSSID.length() > 0)
|
||||
{
|
||||
Serial.printf("WPS finished. Connected successfull to SSID '%s'\n", newSSID.c_str());
|
||||
switchToSate(runningState);
|
||||
}
|
||||
else
|
||||
{
|
||||
Serial.printf("WPS failed.");
|
||||
switchToSate(noWifiState);
|
||||
}
|
||||
}
|
||||
}
|
14
src/wpsstate.h
Normal file
14
src/wpsstate.h
Normal file
@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include "state.h"
|
||||
|
||||
class WpsState : public State
|
||||
{
|
||||
public:
|
||||
WpsState() : State(true, true, 400)
|
||||
{}
|
||||
virtual void enterState();
|
||||
virtual const char* name() { return "Wps"; }
|
||||
};
|
||||
|
||||
extern WpsState wpsState;
|
Loading…
Reference in New Issue
Block a user