Compare commits

..

No commits in common. "d092fd505855d608e0a17aa4836f1a58c16a8363" and "f351ea59b7da8fd879a021757960ae428df49549" have entirely different histories.

30
irena.c
View file

@ -1250,13 +1250,13 @@ static inline int base85_encode1(unsigned int b, char *s)
return 1;
}
s += 5;
*s-- = 0;
*s = 0;
for (int i=0; i<4; i++) {
unsigned int bb = b;
b /= 85;
*s-- = bb - b*85 + 33;
}
*s = b + 33;
*s = b;
return 5;
}
@ -2134,27 +2134,6 @@ char *poll_response(time_t timeout)
return l;
}
////////////////////////////////////////////////////////////////////////////////////////////////////
// ARM message log readout
int read_messages()
{
int n = 0;
while (n++<33) {
static const char cmd[] = "mes";
silent(2);
while (-2==send_irena_command(cmd)) {
unsilent();
poll_uart(1);
}
unsilent();
char *res = poll_response(2);
if (!res || !*res || !strncmp(res+1, "100", 3))
break;
}
return 0;
}
////////////////////////////////////////////////////////////////////////////////////////////////////
// Send the contents of a file to the flash_buffer and exectute CR_BUFFER in each
@ -2243,6 +2222,7 @@ int send_file_85(const char *fn)
int c = snprintf(cmd, 64, "v f[%d]=:{", i);
while (c<58 && i<128)
c += base85_encode1(buf[i++], cmd+c);
cmd[c++] = 0;
while (retry<3) {
loud(2);
while (-2==send_irena_command(cmd))
@ -2707,7 +2687,6 @@ int process_cmd(char *l)
"\texit «code»\n"
"\tsleep «seconds»\n"
"\tscript «filename»\n"
"\tmessages\n"
"\tuart «tty» [«baudrate»] [reset|rs232|rs422|gpio[0]]\n"
"\tirena «commandline»\n"
"\tfct «lines»\n"
@ -2896,9 +2875,6 @@ int process_cmd(char *l)
return 0;
}
if (!strcmp(av[0], "messages"))
return read_messages();
if (!strcmp(av[0], "path")) {
struct paths *pp;
for (pp=paths; pp->name; pp++)