fix a bug in fcap conf

remotes/github/direct
Ondřej Hruška 6 years ago
parent b678a8f2b7
commit f8181a10d1
Signed by: MightyPork
GPG Key ID: 2C5FD5035250423D
  1. 2
      units/fcap/_fcap_settings.c
  2. 6
      units/fcap/unit_fcap.c

@ -100,7 +100,7 @@ void UFCAP_writeIni(Unit *unit, IniWriter *iw)
iw_entry(iw, "active-level", "%d", (int)priv->conf.active_level); iw_entry(iw, "active-level", "%d", (int)priv->conf.active_level);
iw_comment(iw, "Input filtering (0-15)"); iw_comment(iw, "Input filtering (0-15)");
iw_entry(iw, "input-filter", "%d", (int)priv->conf.active_level); iw_entry(iw, "input-filter", "%d", (int)priv->conf.dfilter);
iw_comment(iw, "Pulse counter pre-divider (1,2,4,8)"); iw_comment(iw, "Pulse counter pre-divider (1,2,4,8)");
iw_entry(iw, "direct-presc", "%d", (int)priv->conf.direct_presc); iw_entry(iw, "direct-presc", "%d", (int)priv->conf.direct_presc);

@ -22,19 +22,21 @@ enum FcapCmd_ {
CMD_DIRECT_BURST_START = 4, // wait and reply CMD_DIRECT_BURST_START = 4, // wait and reply
CMD_FREECOUNT_START = 5, // keep counting pulses until stopped, read on reply CMD_FREECOUNT_START = 5, // keep counting pulses until stopped, read on reply
CMD_MEASURE_SINGLE_PULSE = 6, CMD_MEASURE_SINGLE_PULSE = 6, // measure the first incoming pulse of the right polarity. NOTE: can glitch if the signal starts in the active level
CMD_FREECOUNT_CLEAR = 7, CMD_FREECOUNT_CLEAR = 7, // clear the free counter, return last value
// Results readout for continuous modes // Results readout for continuous modes
CMD_INDIRECT_CONT_READ = 10, CMD_INDIRECT_CONT_READ = 10,
CMD_DIRECT_CONT_READ = 11, CMD_DIRECT_CONT_READ = 11,
CMD_FREECOUNT_READ = 12, CMD_FREECOUNT_READ = 12,
// configs
CMD_SET_POLARITY = 20, CMD_SET_POLARITY = 20,
CMD_SET_DIR_PRESC = 21, CMD_SET_DIR_PRESC = 21,
CMD_SET_INPUT_FILTER = 22, CMD_SET_INPUT_FILTER = 22,
CMD_SET_DIR_MSEC = 23, CMD_SET_DIR_MSEC = 23,
// go back to the configured settings
CMD_RESTORE_DEFAULTS = 30, CMD_RESTORE_DEFAULTS = 30,
}; };

Loading…
Cancel
Save