#include "project.h" #if 0 #define FS_FILE_FLAGS_HEADER_INCLUDED 0x01 #define FS_FILE_FLAGS_HEADER_PERSISTENT 0x02 #define FS_FILE_FLAGS_HEADER_HTTPVER_1_1 0x04 #define FS_FILE_FLAGS_SSI 0x08 #endif static char index_html[8192]; static uint32_t make_index (void) { uint64_t abs = ref_get(); EPOCH e; UTC u; ST l; char buf[128]; PTB_INIT (index_html); e = ref_decompose (abs); u = time_epoch_to_utc (e); l = time_utc_to_lst (u, gps_lon); utc_to_str (buf, &u); PTB_ADD ("
\n");
  PTB_ADD ("UTC: %s\n", buf);
  PTB_ADD ("LST:                 %02d:%02d:%02d.%09d\n", l.hour, l.minute, l.second, l.nanosecond);
  PTB_ADD("\n");

  PTB_ADD ("GPS:\n");
  PTB_ADD ("%s\n", gps_info);
  PTB_ADD (" %s\n", gps_pos);
  PTB_ADD (" %s\n", gps_svin_info);
  PTB_ADD("\n");

  PTB_ADD ("%s", gps_svinfo);
  PTB_ADD ("
\n"); return PTB_LEN; } int fs_open_custom (struct fs_file *file, const char *name) { int len; if (strcmp (name, "/index.html")) return 0; len = make_index(); file->data = (const char *)index_html; file->len = len; file->index = file->len; file->pextension = NULL; file->flags = 0; return 1; } void fs_close_custom (struct fs_file *file) { }