diff --git a/main.py b/main.py index 87813e9..15c6a6e 100644 --- a/main.py +++ b/main.py @@ -8,7 +8,7 @@ import protocols.Nemaxx_WL10_SmokeDetector nemaxx = protocols.Nemaxx_WL10_SmokeDetector.Nemaxx_WL10_SmokeDetector() with open('output.complex', 'wb') as f: - samples = nemaxx.generateSamples(repeatNum=10) + samples = nemaxx.generateSamples(repeatNum=10, alarmTheSlave=True) samples.tofile(f) """ diff --git a/protocols/Nemaxx_WL10_SmokeDetector.py b/protocols/Nemaxx_WL10_SmokeDetector.py index ebe6950..7c04eaf 100644 --- a/protocols/Nemaxx_WL10_SmokeDetector.py +++ b/protocols/Nemaxx_WL10_SmokeDetector.py @@ -8,9 +8,9 @@ class Nemaxx_WL10_SmokeDetector: self.modulator = OOKModulator(baseband_samplerate=baseband_samplerate, am_frequency=22.471e3) def test(self): print("Nemaxx WL10 Smokedetector (433MHz)") - def generateSamples(self, repeatNum=20, numpyType=np.complex64): + def generateSamples(self, repeatNum=20, alarmID24Bit, numpyType=np.complex64): for i in range(repeatNum): - bits = [0,1,0,0,0,1,1,1,0,1,0,1,1,0,1,1,1,1,1,0,1,0,1,0] + bits = alarmID24Bit print(bits) self.modulator.addModulation(8120) self.modulator.addPadding(912)