Loading src/camogm.c +8 −2 Original line number Diff line number Diff line Loading @@ -223,6 +223,8 @@ void check_compressors(camogm_state *state) if (getGPValue(i, P_COMPRESSOR_RUN) != COMPRESSOR_RUN_STOP) { state->active_chn |= 1 << i; } // restore the state of disabled channels state->active_chn &= state->active_chn_mask; } } Loading Loading @@ -274,6 +276,7 @@ void camogm_init(camogm_state *state, char *pipe_name, uint16_t port_num) state->rawdev.curr_pos_w = state->rawdev.start_pos; state->rawdev.curr_pos_r = state->rawdev.start_pos; state->active_chn = ALL_CHN_INACTIVE; state->active_chn_mask = ALL_CHN_ACTIVE; state->rawdev.mmap_default_size = MMAP_CHUNK_SIZE; state->sock_port = port_num; Loading Loading @@ -2077,10 +2080,13 @@ inline int is_chn_active(camogm_state *s, unsigned int port) inline void set_chn_state(camogm_state *s, unsigned int port, unsigned int new_state) { if (port >= 0 && port < SENSOR_PORTS) { if (new_state) if (new_state) { s->active_chn |= 1 << port; else s->active_chn_mask |= 1 << port; } else { s->active_chn &= ~(1 << port); s->active_chn_mask &= ~(1 << port); } } } Loading src/camogm.h +2 −0 Original line number Diff line number Diff line Loading @@ -256,6 +256,8 @@ typedef struct { int rawdev_op; ///< flag indicating writing to raw device rawdev_buffer rawdev; ///< contains pointers to raw device buffer unsigned int active_chn; ///< bitmask of active sensor ports unsigned int active_chn_mask; ///< bitmask of enabled sensor ports; used to save enabled/disabled ports between ///< consecutive starts/stops as active ports list is updated on each start uint16_t sock_port; ///< command socket port number struct writer_params writer_params; ///< contains control parameters for writing thread unsigned int error_stat[SENSOR_PORTS][CAMOGM_ERRNUM]; ///< collect statistics about errors Loading Loading
src/camogm.c +8 −2 Original line number Diff line number Diff line Loading @@ -223,6 +223,8 @@ void check_compressors(camogm_state *state) if (getGPValue(i, P_COMPRESSOR_RUN) != COMPRESSOR_RUN_STOP) { state->active_chn |= 1 << i; } // restore the state of disabled channels state->active_chn &= state->active_chn_mask; } } Loading Loading @@ -274,6 +276,7 @@ void camogm_init(camogm_state *state, char *pipe_name, uint16_t port_num) state->rawdev.curr_pos_w = state->rawdev.start_pos; state->rawdev.curr_pos_r = state->rawdev.start_pos; state->active_chn = ALL_CHN_INACTIVE; state->active_chn_mask = ALL_CHN_ACTIVE; state->rawdev.mmap_default_size = MMAP_CHUNK_SIZE; state->sock_port = port_num; Loading Loading @@ -2077,10 +2080,13 @@ inline int is_chn_active(camogm_state *s, unsigned int port) inline void set_chn_state(camogm_state *s, unsigned int port, unsigned int new_state) { if (port >= 0 && port < SENSOR_PORTS) { if (new_state) if (new_state) { s->active_chn |= 1 << port; else s->active_chn_mask |= 1 << port; } else { s->active_chn &= ~(1 << port); s->active_chn_mask &= ~(1 << port); } } } Loading
src/camogm.h +2 −0 Original line number Diff line number Diff line Loading @@ -256,6 +256,8 @@ typedef struct { int rawdev_op; ///< flag indicating writing to raw device rawdev_buffer rawdev; ///< contains pointers to raw device buffer unsigned int active_chn; ///< bitmask of active sensor ports unsigned int active_chn_mask; ///< bitmask of enabled sensor ports; used to save enabled/disabled ports between ///< consecutive starts/stops as active ports list is updated on each start uint16_t sock_port; ///< command socket port number struct writer_params writer_params; ///< contains control parameters for writing thread unsigned int error_stat[SENSOR_PORTS][CAMOGM_ERRNUM]; ///< collect statistics about errors Loading