...
 
Commits (11)
......@@ -21,3 +21,6 @@ doxygen.tag
/image
/scripts
/html
/src/camogm_fifo_reader
/src/camogm_fifo_writer
\ No newline at end of file
This diff is collapsed.
......@@ -29,9 +29,9 @@
#include <getopt.h>
#include <ctype.h>
#include <elphel/ahci_cmd.h>
#include <poll.h>
#ifdef USE_POLL
#include <poll.h>
#endif
#include "camogm_ogm.h"
#include "camogm_jpeg.h"
#include "camogm_mov.h"
......@@ -71,6 +71,9 @@ char trailer[TRAILER_SIZE] = { 0xff, 0xd9 };
const char *exifFileNames[] = { DEV393_PATH(DEV393_EXIF0), DEV393_PATH(DEV393_EXIF1),
DEV393_PATH(DEV393_EXIF2), DEV393_PATH(DEV393_EXIF3)
};
const char *tiffFileNames[] = { DEV393_PATH(DEV393_TIFF0), DEV393_PATH(DEV393_TIFF1),
DEV393_PATH(DEV393_TIFF2), DEV393_PATH(DEV393_TIFF3)
};
const char *headFileNames[] = { DEV393_PATH(DEV393_JPEGHEAD0), DEV393_PATH(DEV393_JPEGHEAD1),
DEV393_PATH(DEV393_JPEGHEAD2), DEV393_PATH(DEV393_JPEGHEAD3)
......@@ -166,6 +169,9 @@ void clean_up(camogm_state *state);
static void camogm_err_stat(const camogm_state *state, int port, FILE *f, bool xml);
static void camogm_set_dummy_read(camogm_state *state, int d);
//static void dbg_show_packetchunks(camogm_state *state);
void put_uint16(void *buf, u_int16_t val)
{
unsigned char *tmp;
......@@ -528,6 +534,7 @@ int sendImageFrame(camogm_state *state)
int timestamp_start;
int * ifp_this = (int*)&(state->this_frame_params[state->port_num]);
int fp;
int fd_exif_tiff; // switching between TIFF and Exif depending on coloe mode
int port = state->port_num;
struct timeval start_time, end_time;
......@@ -621,12 +628,13 @@ int sendImageFrame(camogm_state *state)
D3(fprintf(debug_file, "_4_"));
if (state->exif) {
D3(fprintf(debug_file, "_5_"));
fd_exif_tiff = (state->this_frame_params[port].color == COLORMODE_RAW)? state->fd_tiff[port] : state->fd_exif[port];
// update the Exif header with the current frame metadata
state->exifSize[port] = lseek(state->fd_exif[port], 1, SEEK_END); // at the beginning of page 1 - position == page length
state->exifSize[port] = lseek(fd_exif_tiff, 1, SEEK_END); // at the beginning of page 1 - position == page length
if (state->exifSize[port] > 0) {
//state->this_frame_params.meta_index
lseek(state->fd_exif[port], state->this_frame_params[port].meta_index, SEEK_END); // select meta page to use (matching frame)
rslt = read(state->fd_exif[port], state->ed[port], state->exifSize[port]);
lseek(fd_exif_tiff, state->this_frame_params[port].meta_index, SEEK_END); // select meta page to use (matching frame)
rslt = read(fd_exif_tiff, state->ed[port], state->exifSize[port]);
if (rslt < 0) rslt = 0;
state->exifSize[port] = rslt;
} else state->exifSize[port] = 0;
......@@ -638,14 +646,22 @@ int sendImageFrame(camogm_state *state)
state->chunk_index = 0;
state->packetchunks[state->chunk_index ].bytes = 1;
state->packetchunks[state->chunk_index++].chunk = &frame_packet_type;
if (state->exif > 0) { // insert Exif
if (state->exif > 0) { // insert Exif/Tiff
D3(fprintf(debug_file, "_7_"));
if (state->this_frame_params[port].color == COLORMODE_RAW) { // Tiff
D3(fprintf(debug_file, "_8a_"));
state->packetchunks[state->chunk_index ].bytes = state->exifSize[port]; // Tiff Header length
state->packetchunks[state->chunk_index++].chunk = state->ed[port]; // Tiff Header
} else { // JPEG/JP4
// D3(fprintf(debug_file, "_8b_"));
state->packetchunks[state->chunk_index ].bytes = 2;
state->packetchunks[state->chunk_index++].chunk = state->jpegHeader[port];
state->packetchunks[state->chunk_index ].bytes = state->exifSize[port];
state->packetchunks[state->chunk_index++].chunk = state->ed[port];
state->packetchunks[state->chunk_index ].bytes = state->head_size[port] - 2;
state->packetchunks[state->chunk_index++].chunk = &(state->jpegHeader[port][2]);
}
} else {
D3(fprintf(debug_file, "_8_"));
state->packetchunks[state->chunk_index ].bytes = state->head_size[port];
......@@ -653,7 +669,7 @@ int sendImageFrame(camogm_state *state)
}
D3(fprintf(debug_file, "_9_"));
/* JPEG image data may be split in two segments (rolled over buffer end) - process both variants */
/* Jpeg/Tiff image data may be split in two segments (rolled over buffer end) - process both variants */
if ((state->cirbuf_rp[port] + state->jpeg_len) > state->circ_buff_size[port]) { // two segments
/* copy from the beginning of the frame to the end of the buffer */
D3(fprintf(debug_file, "_10_"));
......@@ -673,8 +689,14 @@ int sendImageFrame(camogm_state *state)
}
D3(fprintf(debug_file, "\tcirbuf_rp = 0x%x\t", state->cirbuf_rp[port]));
D3(fprintf(debug_file, "_12_"));
// if (state->this_frame_params[port].color != COLORMODE_RAW) { // Tiff
state->packetchunks[state->chunk_index ].bytes = 2;
state->packetchunks[state->chunk_index++].chunk = (unsigned char*)trailer;
// }
// dbg_show_packetchunks(state);
switch (state->format) {
case CAMOGM_FORMAT_NONE: rslt = 0; break;
......@@ -718,6 +740,16 @@ int sendImageFrame(camogm_state *state)
return 0;
}
/*
static void dbg_show_packetchunks(camogm_state *state)
{
int i;
for (i = 0; i < FILE_CHUNKS_NUM; i++) {
D4(fprintf(debug_file, "packetchunk[%d]: ptr = %p, size = %d\n", i, state->packetchunks[i].chunk, state->packetchunks[i].bytes));
}
}
*/
/**
* @brief Stop current recording. If recording was not started, this function has no effect. This function
......@@ -1307,7 +1339,11 @@ char * getLineFromPipe(FILE* npipe)
if (!nlp) { //no complete string, try to read more
// 2019/01/16: this change is related to switching to poll()
//fl = fread(&cmdbuf[cmdbufp], 1, sizeof(cmdbuf) - cmdbufp - 1, npipe);
#ifdef USE_POLL
fl = read(npipe, &cmdbuf[cmdbufp], sizeof(cmdbuf) - cmdbufp - 1);
#else
fl = fread(&cmdbuf[cmdbufp], 1, sizeof(cmdbuf) - cmdbufp - 1, npipe);
#endif
cmdbuf[cmdbufp + fl] = 0;
// is there any complete string in a buffer after reading?
nlp = strpbrk(&cmdbuf[cmdbufp], ";\n"); // there were no new lines before cmdbufp
......@@ -1523,6 +1559,8 @@ void clean_up(camogm_state *state)
for (int port = 0; port < SENSOR_PORTS; port++) {
if (is_fd_valid(state->fd_exif[port]))
close(state->fd_exif[port]);
if (is_fd_valid(state->fd_tiff[port]))
close(state->fd_tiff[port]);
if (is_fd_valid(state->fd_head[port]))
close(state->fd_head[port]);
if (is_fd_valid(state->fd_circ[port]))
......@@ -1553,9 +1591,9 @@ int listener_loop(camogm_state *state)
int process = 1;
int curr_port = 0;
const char *pipe_name = state->pipe_name;
#ifdef USE_POLL
struct pollfd pfd;
#endif
// create a named pipe
// always delete the pipe if it existed, start a fresh one
f_ok = access(pipe_name, F_OK);
......@@ -1575,17 +1613,7 @@ int listener_loop(camogm_state *state)
}
}
/* old */
/*
// now open the pipe - will block until something will be written (or just open for writing,
// reads themselves will not block)
if (!((cmd_file = fopen(pipe_name, "r")))) {
D0(fprintf(debug_file, "Can not open command file %s\n", pipe_name));
clean_up(state);
return -5;
}
*/
#ifdef USE_POLL
/* new: 2019/01/16 */
// Adding poll() because supposedly read calls (read, fread)
......@@ -1604,7 +1632,16 @@ int listener_loop(camogm_state *state)
// ready to read
pfd.events = POLLIN;
pfd.fd = cmd_file;
/* old */
#else
// now open the pipe - will block until something will be written (or just open for writing,
// reads themselves will not block)
if (!((cmd_file = fopen(pipe_name, "r")))) {
D0(fprintf(debug_file, "Can not open command file %s\n", pipe_name));
clean_up(state);
return -5;
}
#endif
D0(fprintf(debug_file, "Pipe %s open for reading\n", pipe_name)); // to make sure something is sent out
// enter main processing loop
......@@ -1613,18 +1650,24 @@ int listener_loop(camogm_state *state)
state->port_num = curr_port;
// look at command queue first
#ifdef USE_POLL
ret = poll(&pfd,1,DEFAULT_POLL_TIMEOUT);
if (ret==0){
D6(fprintf(debug_file, "Waiting for commands...\n"));
D6(fprintf(debug_file, "Waiting for commands..., state->prog_state = %d, pfd.revents=%d\n",state->prog_state, (int) pfd.revents));
}
if (pfd.revents & POLLIN){
#endif
cmd = parse_cmd(state, cmd_file);
if (cmd) {
if (cmd < 0) D0(fprintf(debug_file, "Unrecognized command\n"));
#ifdef USE_POLL
}
#endif
} else if (state->prog_state == STATE_RUNNING) { // no commands in queue, started
D6(fprintf(debug_file, "state->prog_state == STATE_RUNNING "));
switch ((rslt = -sendImageFrame(state))) {
D6(fprintf(debug_file, " ==> %d",rslt));
case 0:
break; // frame sent OK, nothing to do (TODO: check file length/duration)
case CAMOGM_FRAME_NOT_READY: // just wait for the frame to appear at the current pointer
......@@ -1713,7 +1756,9 @@ int listener_loop(camogm_state *state)
state->rawdev.thread_state = STATE_RUNNING;
usleep(COMMAND_LOOP_DELAY); // make it longer but interruptible by signals?
}
} // if pfd.revents & POLLIN
#ifdef USE_POLL
// } // if pfd.revents & POLLIN
#endif
} // while (process)
// normally, we should not be here
......@@ -1993,6 +2038,14 @@ int open_files(camogm_state *state)
return -1;
}
// open Tiff header file
state->fd_tiff[port] = open(tiffFileNames[port], O_RDONLY);
if (state->fd_tiff[port] < 0) { // check control OK
D0(fprintf(debug_file, "Error opening %s\n", tiffFileNames[port]));
clean_up(state);
return -1;
}
// open JPEG header file
state->fd_head[port] = open(headFileNames[port], O_RDWR);
if (state->fd_head[port] < 0) { // check control OK
......
......@@ -18,7 +18,7 @@
#ifndef _CAMOGM_H
#define _CAMOGM_H
//#define USE_POLL
#include <pthread.h>
#include <stdbool.h>
#include <ogg/ogg.h>
......@@ -182,6 +182,7 @@ typedef struct {
int fd_head[SENSOR_PORTS]; ///< file descriptor for JPEG header
int fd_fparmsall[SENSOR_PORTS]; ///< file descriptor for sensor/compressor parameters
int fd_exif[SENSOR_PORTS]; ///< file descriptor for Exif data
int fd_tiff[SENSOR_PORTS]; ///< file descriptor for Tiff data
int head_size[SENSOR_PORTS]; ///< JPEG header size
unsigned char jpegHeader[SENSOR_PORTS][JPEG_HEADER_MAXSIZE];
int metadata_start;
......@@ -205,7 +206,7 @@ typedef struct {
int ivf; ///< video file (jpeg, mov - open)
int last; ///< last packet in a file
int exif; ///< flag indicating that Exif headers should be calculated and included in each frame
int exif; ///< flag indicating that Exif (or Tiff for raw data) headers should be calculated and included in each frame
int exifSize[SENSOR_PORTS]; ///< signed
unsigned char ed[SENSOR_PORTS][MAX_EXIF_SIZE];
......
......@@ -291,8 +291,12 @@ int camogm_frame_jpeg(camogm_state *state)
struct iovec chunks_iovec[8];
int port = state->port_num;
time_t curr_time;
int is_tiff = state->this_frame_params[port].color == COLORMODE_RAW;
if (is_tiff) {
sprintf(state->path, "%s%d_%010ld_%06ld.tiff", state->path_prefix, port, state->this_frame_params[port].timestamp_sec, state->this_frame_params[port].timestamp_usec);
} else {
sprintf(state->path, "%s%d_%010ld_%06ld.jpeg", state->path_prefix, port, state->this_frame_params[port].timestamp_sec, state->this_frame_params[port].timestamp_usec);
}
if (!state->rawdev_op) {
l = 0;
for (i = 0; i < (state->chunk_index) - 1; i++) {
......
......@@ -84,7 +84,7 @@ int camogm_start_kml(camogm_state *state)
(int)dir_table_entry.ltag, \
(int)dir_table_entry.len, \
(int)dir_table_entry.src, \
(int)dir_table_entry.dst));
(int)dir_table_entry.dst_exif));
}
}
close(fd_ExifDir);
......@@ -159,11 +159,11 @@ int camogm_frame_kml(camogm_state *state)
// generating KML itself
// using GPS time - in the same structure
if (state->kml_exif[Exif_GPSInfo_GPSDateStamp_Index].ltag == Exif_GPSInfo_GPSDateStamp) { // Exif_GPSInfo_GPSDateStamp is present in template
memcpy(datestr, &(state->ed[port][state->kml_exif[Exif_GPSInfo_GPSDateStamp_Index].dst]), 10);
memcpy(datestr, &(state->ed[port][state->kml_exif[Exif_GPSInfo_GPSDateStamp_Index].dst_exif]), 10);
datestr[4] = '-'; datestr[7] = '-'; datestr[10] = '\0';
}
if (state->kml_exif[Exif_GPSInfo_GPSTimeStamp_Index].ltag == Exif_GPSInfo_GPSTimeStamp) { // Exif_GPSInfo_GPSTimeStamp is present in template
ip = (int*)&(state->ed[state->kml_exif[Exif_GPSInfo_GPSTimeStamp_Index].dst]);
ip = (int*)&(state->ed[state->kml_exif[Exif_GPSInfo_GPSTimeStamp_Index].dst_exif]);
hours = __cpu_to_be32( ip[0]);
minutes = __cpu_to_be32( ip[2]);
seconds = (1.0 * (__cpu_to_be32( ip[4]) + 1)) / __cpu_to_be32( ip[5]); // GPS likes ".999", let's inc by one - anyway will round that out
......@@ -179,52 +179,52 @@ int camogm_frame_kml(camogm_state *state)
// knowing format provided from GPS - degrees and minuts only, no seconds:
if (state->kml_exif[Exif_GPSInfo_GPSLongitude_Index].ltag == Exif_GPSInfo_GPSLongitude) { // Exif_GPSInfo_GPSLongitude is present in template
ip = (int*)&(state->ed[state->kml_exif[Exif_GPSInfo_GPSLongitude_Index].dst]);
ip = (int*)&(state->ed[state->kml_exif[Exif_GPSInfo_GPSLongitude_Index].dst_exif]);
longitude = __cpu_to_be32( ip[0]) / (1.0 * __cpu_to_be32( ip[1])) + __cpu_to_be32( ip[2]) / (60.0 * __cpu_to_be32( ip[3]));
if ((state->kml_exif[Exif_GPSInfo_GPSLongitudeRef_Index].ltag == Exif_GPSInfo_GPSLongitudeRef) &&
(state->ed[port][state->kml_exif[Exif_GPSInfo_GPSLongitudeRef_Index].dst] != 'E')) longitude = -longitude;
D2(fprintf(debug_file, "(longitude) 0x%x 0x%x 0x%x 0x%x '%c'\n", ip[0], ip[1], ip[2], ip[3], state->ed[port][state->kml_exif[Exif_GPSInfo_GPSLongitudeRef_Index].dst]));
(state->ed[port][state->kml_exif[Exif_GPSInfo_GPSLongitudeRef_Index].dst_exif] != 'E')) longitude = -longitude;
D2(fprintf(debug_file, "(longitude) 0x%x 0x%x 0x%x 0x%x '%c'\n", ip[0], ip[1], ip[2], ip[3], state->ed[port][state->kml_exif[Exif_GPSInfo_GPSLongitudeRef_Index].dst_exif]));
}
if (state->kml_exif[Exif_GPSInfo_GPSLatitude_Index].ltag == Exif_GPSInfo_GPSLatitude) { // Exif_GPSInfo_GPSLatitude is present in template
ip = (int*)&(state->ed[port][state->kml_exif[Exif_GPSInfo_GPSLatitude_Index].dst]);
ip = (int*)&(state->ed[port][state->kml_exif[Exif_GPSInfo_GPSLatitude_Index].dst_exif]);
latitude = __cpu_to_be32( ip[0]) / (1.0 * __cpu_to_be32( ip[1])) + __cpu_to_be32( ip[2]) / (60.0 * __cpu_to_be32( ip[3]));
if ((state->kml_exif[Exif_GPSInfo_GPSLatitudeRef_Index].ltag == Exif_GPSInfo_GPSLatitudeRef) &&
(state->ed[port][state->kml_exif[Exif_GPSInfo_GPSLatitudeRef_Index].dst] != 'N')) latitude = -latitude;
D2(fprintf(debug_file, "(latitude) 0x%x 0x%x 0x%x 0x%x '%c'\n", ip[0], ip[1], ip[2], ip[3], state->ed[port][state->kml_exif[Exif_GPSInfo_GPSLatitudeRef_Index].dst] ? '-' : '+'));
(state->ed[port][state->kml_exif[Exif_GPSInfo_GPSLatitudeRef_Index].dst_exif] != 'N')) latitude = -latitude;
D2(fprintf(debug_file, "(latitude) 0x%x 0x%x 0x%x 0x%x '%c'\n", ip[0], ip[1], ip[2], ip[3], state->ed[port][state->kml_exif[Exif_GPSInfo_GPSLatitudeRef_Index].dst_exif] ? '-' : '+'));
}
// altitude - will be modified/replaced later
if (state->kml_exif[Exif_GPSInfo_GPSAltitude_Index].ltag == Exif_GPSInfo_GPSAltitude) { // Exif_GPSInfo_GPSAltitude is present in template
ip = (int*)&(state->ed[port][state->kml_exif[Exif_GPSInfo_GPSAltitude_Index].dst]);
ip = (int*)&(state->ed[port][state->kml_exif[Exif_GPSInfo_GPSAltitude_Index].dst_exif]);
altitude = (1.0 * __cpu_to_be32( ip[0])) / __cpu_to_be32( ip[1]);
if ((state->kml_exif[Exif_GPSInfo_GPSAltitudeRef_Index].ltag == Exif_GPSInfo_GPSAltitudeRef) &&
(state->ed[port][state->kml_exif[Exif_GPSInfo_GPSAltitudeRef_Index].dst] != '\0')) altitude = -altitude;
D2(fprintf(debug_file, "(altitude) 0x%x 0x%x '%c'\n", ip[0], ip[1], state->ed[port][state->kml_exif[Exif_GPSInfo_GPSAltitudeRef_Index].dst]));
(state->ed[port][state->kml_exif[Exif_GPSInfo_GPSAltitudeRef_Index].dst_exif] != '\0')) altitude = -altitude;
D2(fprintf(debug_file, "(altitude) 0x%x 0x%x '%c'\n", ip[0], ip[1], state->ed[port][state->kml_exif[Exif_GPSInfo_GPSAltitudeRef_Index].dst_exif]));
}
D1(fprintf(debug_file, "longitude=%f, latitude=%f, altitude=%f\n", longitude, latitude, altitude));
// heading - no processing of "True/Magnetic" Exif_GPSInfo_CompassDirectionRef now (always M)
if (state->kml_exif[Exif_GPSInfo_CompassDirection_Index].ltag == Exif_GPSInfo_CompassDirection) { // Exif_GPSInfo_CompassDirection is present in template
ip = (int*)&(state->ed[port][state->kml_exif[Exif_GPSInfo_CompassDirection_Index].dst]);
ip = (int*)&(state->ed[port][state->kml_exif[Exif_GPSInfo_CompassDirection_Index].dst_exif]);
heading = (1.0 * __cpu_to_be32( ip[0])) / __cpu_to_be32( ip[1]);
D2(fprintf(debug_file, "(heading) 0x%x 0x%x\n", ip[0], ip[1]));
}
// processing 'hacked' pitch and roll (made of Exif destination latitude/longitude)
if (state->kml_exif[Exif_GPSInfo_CompassRoll_Index].ltag == Exif_GPSInfo_CompassRoll) { // Exif_GPSInfo_CompassRoll is present in template
ip = (int*)&(state->ed[state->kml_exif[Exif_GPSInfo_CompassRoll_Index].dst]);
ip = (int*)&(state->ed[state->kml_exif[Exif_GPSInfo_CompassRoll_Index].dst_exif]);
roll = __cpu_to_be32( ip[0]) / (1.0 * __cpu_to_be32( ip[1])) + __cpu_to_be32( ip[2]) / (60.0 * __cpu_to_be32( ip[3]));
if ((state->kml_exif[Exif_GPSInfo_CompassRollRef_Index].ltag == Exif_GPSInfo_CompassRollRef) &&
(state->ed[port][state->kml_exif[Exif_GPSInfo_CompassRollRef_Index].dst] != EXIF_COMPASS_ROLL_ASCII[0])) roll = -roll;
D2(fprintf(debug_file, "(roll) 0x%x 0x%x '%c'\n", ip[0], ip[1], state->ed[port][state->kml_exif[Exif_GPSInfo_CompassRollRef_Index].dst]));
(state->ed[port][state->kml_exif[Exif_GPSInfo_CompassRollRef_Index].dst_exif] != EXIF_COMPASS_ROLL_ASCII[0])) roll = -roll;
D2(fprintf(debug_file, "(roll) 0x%x 0x%x '%c'\n", ip[0], ip[1], state->ed[port][state->kml_exif[Exif_GPSInfo_CompassRollRef_Index].dst_exif]));
}
if (state->kml_exif[Exif_GPSInfo_CompassPitch_Index].ltag == Exif_GPSInfo_CompassPitch) { // Exif_GPSInfo_CompassPitch is present in template
ip = (int*)&(state->ed[port][state->kml_exif[Exif_GPSInfo_CompassPitch_Index].dst]);
ip = (int*)&(state->ed[port][state->kml_exif[Exif_GPSInfo_CompassPitch_Index].dst_exif]);
pitch = __cpu_to_be32( ip[0]) / (1.0 * __cpu_to_be32( ip[1])) + __cpu_to_be32( ip[2]) / (60.0 * __cpu_to_be32( ip[3]));
if ((state->kml_exif[Exif_GPSInfo_CompassPitchRef_Index].ltag == Exif_GPSInfo_CompassPitchRef) &&
(state->ed[port][state->kml_exif[Exif_GPSInfo_CompassPitchRef_Index].dst] != EXIF_COMPASS_PITCH_ASCII[0])) pitch = -pitch;
D2(fprintf(debug_file, "(pitch) 0x%x 0x%x '%c'\n", ip[0], ip[1], state->ed[port][state->kml_exif[Exif_GPSInfo_CompassPitchRef_Index].dst]));
(state->ed[port][state->kml_exif[Exif_GPSInfo_CompassPitchRef_Index].dst_exif] != EXIF_COMPASS_PITCH_ASCII[0])) pitch = -pitch;
D2(fprintf(debug_file, "(pitch) 0x%x 0x%x '%c'\n", ip[0], ip[1], state->ed[port][state->kml_exif[Exif_GPSInfo_CompassPitchRef_Index].dst_exif]));
}
// convert from GPS heading, pitch, roll to KML heading, tilt, roll
tilt = pitch + 90.0;
......
......@@ -40,7 +40,7 @@ function reload() {
}
function mount_hdd(callback) {
makeRequest('camogm_interface.php','?cmd=mount',callback);
document.getElementById('directory').value = "/var/hdd/";
document.getElementById('directory').value = "/mnt/sda1/";
document.getElementById('mount_hdd_button').style.display = "none";
}
......@@ -56,7 +56,7 @@ function process_mount_hdd(xmldoc) {
function mount_custom_partition(partition) {
if (document.getElementById("mount_point").value != "") {
makeRequest('camogm_interface.php','?cmd=mount&partition='+partition+'&mountpoint='+document.getElementById("mount_point").value,"scan_devices()");
document.getElementById('directory').value = "/var/hdd/";
document.getElementById('directory').value = "/mnt/sda1/";
document.getElementById('mount_hdd_button').style.display = "none";
}
}
......@@ -137,7 +137,7 @@ function process_scan_devices(xmldoc) {
content += "<tr><td></td><td>"+partition+"</td><td><input id='mount_point' size='8' type='text'";
//if (partition=="/dev/hda1"){
if (partition=="/dev/sda1"){
content += " value='/var/hdd'";
content += " value='/mnt/sda1'";
}
content += "></td><td>" + xmldoc.getElementsByTagName('size')[i].firstChild.data + "</td><td>" + '</td><td><a href="#" onClick="mount_custom_partition(\''+partition+'\');">mount</a></td></tr>';
} else {
......@@ -158,7 +158,6 @@ function process_scan_devices(xmldoc) {
function find_selected_device(){
for(var i=0;i<devices.length;i++){
if (devices[i]=="/dev/hda1") selected_device = devices[i];
if (devices[i]=="/dev/sda1") selected_device = devices[i];
break;
}
......
......@@ -344,7 +344,7 @@
fprintf($fcmd, "prefix=%s;\n", $xml_directory);
}
else
fprintf($fcmd, "prefix=%s;\n", "/var/hdd/");
fprintf($fcmd, "prefix=%s;\n", "/mnt/sda1/");
}
}
......@@ -518,7 +518,11 @@
<?php
for ($i = 0; $i < $sensor_ports; $i++) {
echo "<td id=\"ajax_qual\">";
if (elphel_get_P_value($i, ELPHEL_COLOR) == 15){ // TIFF
echo "TIFF".elphel_get_P_value($i, ELPHEL_BITS);
} else {
echo elphel_get_P_value($i, ELPHEL_QUALITY) . " %";
}
echo "</td>";
}
?>
......@@ -616,9 +620,9 @@
else
echo "<input type=\"radio\" id=\"radioMov\" style=\"top:3px; position:relative;\" name=\"container\" value=\"mov\" onChange=\"format_changed(this);\"> Apple Quicktime Movie<br />";
if ($xml_format == "jpeg")
echo "<input type=\"radio\" id=\"radioJpg\" style=\"top:3px; position:relative;\" name=\"container\" value=\"jpg\" onChange=\"format_changed(this);\" checked> JPEG Sequence<br />";
echo "<input type=\"radio\" id=\"radioJpg\" style=\"top:3px; position:relative;\" name=\"container\" value=\"jpg\" onChange=\"format_changed(this);\" checked> JPEG/Tiff Sequence<br />";
else
echo "<input type=\"radio\" id=\"radioJpg\" style=\"top:3px; position:relative;\" name=\"container\" value=\"jpg\" onChange=\"format_changed(this);\"> JPEG Sequence<br />";
echo "<input type=\"radio\" id=\"radioJpg\" style=\"top:3px; position:relative;\" name=\"container\" value=\"jpg\" onChange=\"format_changed(this);\"> JPEG/Tiff Sequence<br />";
if ($xml_rawdev_path != "") {
$fastrec_checked = "checked";
} else {
......@@ -656,7 +660,7 @@
<p style="color:red;">not operational yet!</p>
Detected Audio Hardware: <span id="ajax_detected_audio_hardware">loading...</span> <a href="#" onClick="check_audio_hardware();"><img src="images/reload.png" style="bottom:-2px; position:relative;"></a><br />
<br />
Test Audio Playback: <a href="#" onClick="test_audio_playback('/var/hdd/Congas.wav');"><img src="images/play_audio.png" style="position:relative; top:3px;"></a><br />
Test Audio Playback: <a href="#" onClick="test_audio_playback('/mnt/sda1/Congas.wav');"><img src="images/play_audio.png" style="position:relative; top:3px;"></a><br />
<br />
<form method="POST" id="audioform">
<table cellspacing="5px">
......