Commit 4ab23331 authored by Andrey Filippov's avatar Andrey Filippov
Browse files

Merge branch 'master' of github.com:Elphel/elphel-web-camvc

parents bbde16ff e0d3046f
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -344,13 +344,14 @@ function decodeGet ($encoded_get) {
/// _time - will look at FPGA time and program both FPGA and system, _stime - unconditionally program both
            case "_time":
              $toRead["req_ts"]=$value; /// Request time stamp, as received. Will be used by sender
              if (elphel_get_fpga_time() > 100000000) break; // time already set

              $a=((float) $value)/1000;
              if (abs(elphel_get_fpga_time()-$a) < 24*3600) break; // time already set
            case "_stime":
              $toRead["req_ts"]=$value;
              $a=((float) $value)/1000;
              elphel_set_fpga_time ($a); // set FPGA time
              exec("date -s ".date("mdHiY.s",(int)$a),$out,$ret); // set system time
              exec("date -s ".@date("Y-m-d H:i:s.u",(int)$a),$out,$ret); // set system time
              exec("hwclock --systohc");
              break;
            case "imgsrv":
//              $toRead["imgsrv"]='http://'.$_SERVER['HTTP_HOST'].':8081/';