From 9ec1416ad2e267c747af956701752763f5902f14 Mon Sep 17 00:00:00 2001 From: marshmellow42 Date: Wed, 31 Dec 2014 14:43:49 -0500 Subject: [PATCH] added data rtrim command enter location to trim all samples after --- client/cmddata.c | 12 +++++++++++- client/cmddata.h | 1 + 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/client/cmddata.c b/client/cmddata.c index f10d7b53..bb9407d7 100644 --- a/client/cmddata.c +++ b/client/cmddata.c @@ -952,6 +952,15 @@ int CmdLtrim(const char *Cmd) RepaintGraphWindow(); return 0; } +int CmdRtrim(const char *Cmd) +{ + int ds = atoi(Cmd); + + GraphTraceLen = ds; + + RepaintGraphWindow(); + return 0; +} /* * Manchester demodulate a bitstream. The bitstream needs to be already in @@ -1342,13 +1351,14 @@ static command_t CommandTable[] = {"fskdemod", CmdFSKdemod, 1, "Demodulate graph window as a HID FSK"}, {"fskhiddemod", CmdFSKdemodHID, 1, "Demodulate graph window as a HID FSK using raw"}, {"fskiodemod", CmdFSKdemodIO, 1, "Demodulate graph window as an IO Prox FSK using raw"}, - {"fskrawdemod", CmdFSKrawdemod, 1, "[clock rate] [invert] Demodulate graph window from FSK to binary (clock = 64 or 50)(invert = 1 or 0)"}, + {"fskrawdemod", CmdFSKrawdemod, 1, "[clock rate] [invert] [rchigh] [rclow] Demodulate graph window from FSK to binary (clock = 50)(invert = 1 or 0)(rchigh = 10)(rclow=8)"}, {"grid", CmdGrid, 1, " -- overlay grid on graph window, use zero value to turn off either"}, {"hexsamples", CmdHexsamples, 0, " [] -- Dump big buffer as hex bytes"}, {"hide", CmdHide, 1, "Hide graph window"}, {"hpf", CmdHpf, 1, "Remove DC offset from trace"}, {"load", CmdLoad, 1, " -- Load trace (to graph window"}, {"ltrim", CmdLtrim, 1, " -- Trim samples from left of trace"}, + {"rtrim", CmdRtrim, 1, " -- Trim samples from right of trace"}, {"mandemod", CmdManchesterDemod, 1, "[i] [clock rate] -- Manchester demodulate binary stream (option 'i' to invert output)"}, {"manrawdecode", Cmdmandecoderaw, 1, "Manchester decode binary stream already in graph buffer"}, {"manmod", CmdManchesterMod, 1, "[clock rate] -- Manchester modulate a binary stream"}, diff --git a/client/cmddata.h b/client/cmddata.h index 6c1bd9ea..999e6438 100644 --- a/client/cmddata.h +++ b/client/cmddata.h @@ -36,6 +36,7 @@ int CmdHide(const char *Cmd); int CmdHpf(const char *Cmd); int CmdLoad(const char *Cmd); int CmdLtrim(const char *Cmd); +int CmdRtrim(const char *Cmd); int Cmdmandecoderaw(const char *Cmd); int CmdManchesterDemod(const char *Cmd); int CmdManchesterMod(const char *Cmd); -- 2.39.2