Skip to content

Commit

Permalink
Fix formatting in BLEProtocol.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
psachs committed Jun 19, 2024
1 parent 93c7cf9 commit 5fa98fd
Showing 1 changed file with 21 additions and 18 deletions.
39 changes: 21 additions & 18 deletions src/BLEProtocol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,26 +83,29 @@ std::map<DataType, SampleConfig> sampleConfigSelector = {
{.dataType = DataType::T_RH_CO2_ALT,
.downloadType = 7,
.sampleType = 8,
.sampleSizeBytes = 8,
.sampleSizeBytes = 8,
.sampleCountPerPacket = 2,
.sensirionAdvertisementSampleType = 0,
.sampleSlots = {{SignalType::TEMPERATURE_DEGREES_CELSIUS,
{.signalType = SignalType::TEMPERATURE_DEGREES_CELSIUS,
.offset = 0,
.encodingFunction = &encodeTemperatureV1,
.decodingFunction = &decodeTemperatureV1}},
{SignalType::RELATIVE_HUMIDITY_PERCENTAGE,
{.signalType = SignalType::RELATIVE_HUMIDITY_PERCENTAGE,
.offset = 2,
.encodingFunction = &encodeHumidityV1,
.decodingFunction = &decodeHumidityV1}},
{SignalType::CO2_PARTS_PER_MILLION,
{.signalType = SignalType::CO2_PARTS_PER_MILLION,
.offset = 4,
.encodingFunction = &encodeSimple,
.decodingFunction = &decodeSimple}}
// 2 Bytes reserved (ALT), not used, but bytes must be sent for proper decoding of samples
}}},
.sampleSlots =
{
{SignalType::TEMPERATURE_DEGREES_CELSIUS,
{.signalType = SignalType::TEMPERATURE_DEGREES_CELSIUS,
.offset = 0,
.encodingFunction = &encodeTemperatureV1,
.decodingFunction = &decodeTemperatureV1}},
{SignalType::RELATIVE_HUMIDITY_PERCENTAGE,
{.signalType = SignalType::RELATIVE_HUMIDITY_PERCENTAGE,
.offset = 2,
.encodingFunction = &encodeHumidityV1,
.decodingFunction = &decodeHumidityV1}},
{SignalType::CO2_PARTS_PER_MILLION,
{.signalType = SignalType::CO2_PARTS_PER_MILLION,
.offset = 4,
.encodingFunction = &encodeSimple,
.decodingFunction = &decodeSimple}}
// 2 Bytes reserved (ALT), not used, but bytes must be sent for
// proper decoding of samples
}}},
{T_RH_CO2_PM25,
{.dataType = DataType::T_RH_CO2_PM25,
.downloadType = 11,
Expand Down

0 comments on commit 5fa98fd

Please sign in to comment.