added data rtrim command

enter location to trim all samples after
This commit is contained in:
marshmellow42 2014-12-31 14:43:49 -05:00
parent f822a063b3
commit 9ec1416ad2
2 changed files with 12 additions and 1 deletions

View file

@ -952,6 +952,15 @@ int CmdLtrim(const char *Cmd)
RepaintGraphWindow(); RepaintGraphWindow();
return 0; 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 * 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"}, {"fskdemod", CmdFSKdemod, 1, "Demodulate graph window as a HID FSK"},
{"fskhiddemod", CmdFSKdemodHID, 1, "Demodulate graph window as a HID FSK using raw"}, {"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"}, {"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, "<x> <y> -- overlay grid on graph window, use zero value to turn off either"}, {"grid", CmdGrid, 1, "<x> <y> -- overlay grid on graph window, use zero value to turn off either"},
{"hexsamples", CmdHexsamples, 0, "<bytes> [<offset>] -- Dump big buffer as hex bytes"}, {"hexsamples", CmdHexsamples, 0, "<bytes> [<offset>] -- Dump big buffer as hex bytes"},
{"hide", CmdHide, 1, "Hide graph window"}, {"hide", CmdHide, 1, "Hide graph window"},
{"hpf", CmdHpf, 1, "Remove DC offset from trace"}, {"hpf", CmdHpf, 1, "Remove DC offset from trace"},
{"load", CmdLoad, 1, "<filename> -- Load trace (to graph window"}, {"load", CmdLoad, 1, "<filename> -- Load trace (to graph window"},
{"ltrim", CmdLtrim, 1, "<samples> -- Trim samples from left of trace"}, {"ltrim", CmdLtrim, 1, "<samples> -- Trim samples from left of trace"},
{"rtrim", CmdRtrim, 1, "<location to end trace> -- Trim samples from right of trace"},
{"mandemod", CmdManchesterDemod, 1, "[i] [clock rate] -- Manchester demodulate binary stream (option 'i' to invert output)"}, {"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"}, {"manrawdecode", Cmdmandecoderaw, 1, "Manchester decode binary stream already in graph buffer"},
{"manmod", CmdManchesterMod, 1, "[clock rate] -- Manchester modulate a binary stream"}, {"manmod", CmdManchesterMod, 1, "[clock rate] -- Manchester modulate a binary stream"},

View file

@ -36,6 +36,7 @@ int CmdHide(const char *Cmd);
int CmdHpf(const char *Cmd); int CmdHpf(const char *Cmd);
int CmdLoad(const char *Cmd); int CmdLoad(const char *Cmd);
int CmdLtrim(const char *Cmd); int CmdLtrim(const char *Cmd);
int CmdRtrim(const char *Cmd);
int Cmdmandecoderaw(const char *Cmd); int Cmdmandecoderaw(const char *Cmd);
int CmdManchesterDemod(const char *Cmd); int CmdManchesterDemod(const char *Cmd);
int CmdManchesterMod(const char *Cmd); int CmdManchesterMod(const char *Cmd);