Add readme for mmpp_new & refresh russian documentation

This commit is contained in:
eddyem
2019-03-18 12:22:50 +03:00
parent 13467035d6
commit feb6463d8f
6 changed files with 109 additions and 60 deletions

View File

@@ -1,26 +1,26 @@
Simple CLI control tool allowing bash scripting
===================================
===============================================
## Command line arguments
-A, --absmove absolute move (without this flag moving is relative)
-E, --reset reset given mcu (may be included several times)
-L, --lin1=arg move polaroid linear stage to N steps
-R, --rot1=arg rotate polaroid to given angle
-S, --stop stop any moving
-a, --sendraw=arg send RAW string to port and read the answer
-b, --baudrate=arg TTY baudrate
-d, --comdev=arg terminal device filename
-h, --help show this help
-l, --lin2=arg move waveplate linear stage to N steps
-p, --pidfile=arg PID-file name
-q, --quiet don't show anything @screen from stdout
-r, --rot2=arg rotate lambda/4 to given angle
-s, --status get device status
-t, --temp show temperature of both MCU
-w, --wait wait while all previous moving ends
-y, --async asynchronous moving - don't wait
- `-A, --absmove`-- absolute moving, use this flag to point that steps amount (parameters of `-L`, `-l`, `-R` or `-r`) are given in absolute position (without this flag steps meaning as relative);
- `-E, --reset`--` reset given mcu (may be included several times), each `-Ex` (where `x` is controller ID) will send signal to reset given MCU;
- `-L, --lin1=arg`-- move polaroid linear stage to N steps;
- `-R, --rot1=arg`-- rotate polaroid to given angle (angle in degrees);
- `-S, --stop`-- stop any moving (with this flag each MCU will receive a signal to stop any moving);
- `-a, --sendraw=arg`-- send RAW string to port and read the answer, if you want to send something that can't be reached by standard arguments, use this flag;
- `-b, --baudrate=arg`-- TTY baudrate (raw number, e.g. 115200), default speed is 9600;
- `-d, --comdev=arg`-- terminal device filename, default path is `/dev/ttyUSB0`;
- `-h, --help`-- show this help;
- `-l, --lin2=arg`-- move waveplate linear stage to N steps
- `-p, --pidfile=arg`-- PID-file name
- `-q, --quiet`-- don't show anything @screen from stdout
- `-r, --rot2=arg`-- rotate lambda/4 to given angle
- `-s, --status`-- get device status
- `-t, --temp`-- show temperature of both MCU
- `-w, --wait`-- wait while all previous moving ends
- `-y, --async`-- asynchronous moving - don't wait

View File

@@ -67,7 +67,7 @@ static myoption cmdlnopts[] = {
{"wait", NO_ARGS, NULL, 'w', arg_none, APTR(&G.waitold), N_("wait while all previous moving ends")},
{"async", NO_ARGS, NULL, 'y', arg_none, APTR(&G.dontwait), N_("asynchronous moving - don't wait")},
{"lin1", NEED_ARG, NULL, 'L', arg_int, APTR(&G.l1steps), N_("move polaroid linear stage to N steps")},
{"lin2", NEED_ARG, NULL, 'l', arg_int, APTR(&G.l2steps), N_("move waveplate linear stage to N steps")},
{"lin2", NEED_ARG, NULL, 'l', arg_int, APTR(&G.l2steps), N_("move wave-plate linear stage to N steps")},
{"pidfile", NEED_ARG, NULL, 'p', arg_string, APTR(&G.pidfile), N_("PID-file name")},
{"stop", NO_ARGS, NULL, 'S', arg_none, APTR(&G.stopall), N_("stop any moving")},
end_option

View File

@@ -142,7 +142,10 @@ int main(int argc, char **argv){
}
if(handshake()) signals(RET_NOTFOUND); // test connection & get all positions
if(G->waitold) if(tty_wait()) signals(RET_WAITERR);
if(G->waitold){
if(tty_wait()) signals(RET_WAITERR);
handshake();
}
if(G->showtemp){
if(tty_showtemp() != 2) rtn_status = RET_ONLYONE;
}

View File

@@ -278,7 +278,7 @@ static void ttystat(){
char buff[TBUFLEN+1];
if(!quiet) green("Pol: M0ST M0LEFT M0POS - M1ST M1LEFT M1POS || L/4: M0ST M0LEFT M0POS - M1ST M1LEFT M1POS \n");
if(alive[1]) chk1 = parsestatus("1GS");
MSG(NULL, "Pol: ");
if(!quiet) printf("Pol: ");
if(chk1 == -1){
if(!quiet) printf("%39s", "failed");
}else printf("%s", bufo);