Remove PWM_RAW
This commit is contained in:
parent
c1e02642fc
commit
163c71c153
4 changed files with 0 additions and 51 deletions
|
@ -12,7 +12,6 @@
|
|||
#define OOK_PULSE_PCM_RZ 4 // Pulse Code Modulation with Return-to-Zero encoding, Pulse = 0, No pulse = 1
|
||||
#define OOK_PULSE_PPM_RAW 5 // Pulse Position Modulation. No startbit removal. Short gap = 0, Long = 1
|
||||
#define OOK_PULSE_PWM_PRECISE 6 // Pulse Width Modulation with precise timing parameters
|
||||
#define OOK_PULSE_PWM_RAW 7 // DEPRECATED; Pulse Width Modulation. Short pulses = 1, Long = 0
|
||||
#define OOK_PULSE_PIWM_RAW 8 // Level shift for each bit. Short interval = 1, Long = 0
|
||||
#define OOK_PULSE_PIWM_DC 11 // Level shift for each bit. Short interval = 1, Long = 0
|
||||
#define OOK_PULSE_DMC 9 // Level shift within the clock cycle.
|
||||
|
|
|
@ -48,20 +48,6 @@ int pulse_demod_pcm(const pulse_data_t *pulses, r_device *device);
|
|||
int pulse_demod_ppm(const pulse_data_t *pulses, r_device *device);
|
||||
|
||||
|
||||
/// Demodulate a Pulse Width Modulation signal
|
||||
///
|
||||
/// Demodulate a Pulse Width Modulation (PWM) signal consisting of short and long high pulses.
|
||||
/// Gap between pulses may be of fixed size or variable (e.g. fixed period)
|
||||
/// - Short pulse will add a 1 bit
|
||||
/// - Long pulse will add a 0 bit
|
||||
/// @deprecated use pulse_demod_pwm_precise (long_limit becomes gap_limit).
|
||||
/// @param device->short_limit: Threshold between short and long pulse [us]
|
||||
/// @param device->long_limit: Maximum gap size before new row of bits [us]
|
||||
/// @param device->reset_limit: Maximum gap size before End Of Message [us].
|
||||
/// @return number of events processed
|
||||
int pulse_demod_pwm(const pulse_data_t *pulses, r_device *device);
|
||||
|
||||
|
||||
/// Demodulate a Pulse Width Modulation signal
|
||||
///
|
||||
/// Demodulate a Pulse Width Modulation (PWM) signal consisting of short, long, and optional sync pulses.
|
||||
|
|
|
@ -107,38 +107,6 @@ int pulse_demod_ppm(const pulse_data_t *pulses, r_device *device) {
|
|||
}
|
||||
|
||||
|
||||
int pulse_demod_pwm(const pulse_data_t *pulses, r_device *device) {
|
||||
int events = 0;
|
||||
bitbuffer_t bits = {0};
|
||||
|
||||
for(unsigned n = 0; n < pulses->num_pulses; ++n) {
|
||||
// Detect pulse width
|
||||
if(pulses->pulse[n] <= device->s_short_limit) {
|
||||
bitbuffer_add_bit(&bits, 1);
|
||||
} else {
|
||||
bitbuffer_add_bit(&bits, 0);
|
||||
}
|
||||
// End of Message?
|
||||
if (n == pulses->num_pulses - 1 // No more pulses (FSK)
|
||||
|| pulses->gap[n] > device->s_reset_limit) { // Long silence (OOK)
|
||||
if (device->json_callback) {
|
||||
events += device->json_callback(&bits);
|
||||
}
|
||||
// Debug printout
|
||||
if(!device->json_callback || (debug_output && events > 0)) {
|
||||
fprintf(stderr, "pulse_demod_pwm(): %s\n", device->name);
|
||||
bitbuffer_print(&bits);
|
||||
}
|
||||
bitbuffer_clear(&bits);
|
||||
// Check for new packet in multipacket
|
||||
} else if(pulses->gap[n] > device->s_long_limit) {
|
||||
bitbuffer_add_row(&bits);
|
||||
}
|
||||
}
|
||||
return events;
|
||||
}
|
||||
|
||||
|
||||
int pulse_demod_pwm_precise(const pulse_data_t *pulses, r_device *device)
|
||||
{
|
||||
int events = 0;
|
||||
|
|
|
@ -591,9 +591,6 @@ static void sdr_callback(unsigned char *iq_buf, uint32_t len, void *ctx) {
|
|||
case OOK_PULSE_PWM_PRECISE:
|
||||
p_events += pulse_demod_pwm_precise(&demod->pulse_data, demod->r_devs[i]);
|
||||
break;
|
||||
case OOK_PULSE_PWM_RAW:
|
||||
p_events += pulse_demod_pwm(&demod->pulse_data, demod->r_devs[i]);
|
||||
break;
|
||||
case OOK_PULSE_MANCHESTER_ZEROBIT:
|
||||
p_events += pulse_demod_manchester_zerobit(&demod->pulse_data, demod->r_devs[i]);
|
||||
break;
|
||||
|
@ -637,7 +634,6 @@ static void sdr_callback(unsigned char *iq_buf, uint32_t len, void *ctx) {
|
|||
case OOK_PULSE_PCM_RZ:
|
||||
case OOK_PULSE_PPM_RAW:
|
||||
case OOK_PULSE_PWM_PRECISE:
|
||||
case OOK_PULSE_PWM_RAW:
|
||||
case OOK_PULSE_MANCHESTER_ZEROBIT:
|
||||
case OOK_PULSE_PIWM_RAW:
|
||||
case OOK_PULSE_PIWM_DC:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue