Merge remote-tracking branch 'origin/master'
# Conflicts: # main.cpp
This commit is contained in:
@@ -8,6 +8,21 @@
|
||||
#warning "Without config.h"
|
||||
#endif
|
||||
|
||||
#ifndef CAMERA_EXPOSURE
|
||||
#define CAMERA_EXPOSURE (10)
|
||||
#endif
|
||||
|
||||
#ifndef CAMERA_BLUE_GAIN
|
||||
#define CAMERA_BLUE_GAIN (100)
|
||||
#endif
|
||||
|
||||
#ifndef CAMERA_GREEN_GAIN
|
||||
#define CAMERA_GREEN_GAIN (100)
|
||||
#endif
|
||||
|
||||
#ifndef CAMERA_RED_GAIN
|
||||
#define CAMERA_RED_GAIN (100)
|
||||
#endif
|
||||
|
||||
#ifndef ARMOR_CAMERA_GAIN
|
||||
#define ARMOR_CAMERA_GAIN (30)
|
||||
@@ -15,6 +30,7 @@
|
||||
#ifndef ENERGY_CAMERA_GAIN
|
||||
#define ENERGY_CAMERA_GAIN (20)
|
||||
#endif
|
||||
|
||||
//#define GIMBAL_FLIP_MODE (-1)
|
||||
//#define CHASSIS_FLIP_MODE (-1)
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include <camera/camera_wrapper.h>
|
||||
#include <log.h>
|
||||
#include <options/options.h>
|
||||
#include <config/setconfig.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
@@ -75,10 +76,10 @@ bool CameraWrapper::init() {
|
||||
LOGM("successfully loaded %s!", filepath);
|
||||
#elif defined(Linux)
|
||||
CameraSetAeState(h_camera, false);
|
||||
CameraSetExposureTime(h_camera, 10*1000);
|
||||
CameraSetAnalogGain(h_camera, 50);
|
||||
CameraSetExposureTime(h_camera, CAMERA_EXPOSURE*1000);
|
||||
CameraSetAnalogGain(h_camera, ARMOR_CAMERA_GAIN);
|
||||
if(mode == 0){
|
||||
CameraSetGain(h_camera, 100, 135, 119);
|
||||
CameraSetGain(h_camera, CAMERA_BLUE_GAIN, CAMERA_GREEN_GAIN, CAMERA_RED_GAIN);
|
||||
CameraSetLutMode(h_camera, LUTMODE_PRESET);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -3,4 +3,5 @@
|
||||
cd $(dirname $0)/../
|
||||
timeout 8 git pull
|
||||
cd cmake-build-debug
|
||||
cmake ..
|
||||
make -j4
|
||||
|
||||
@@ -2,5 +2,5 @@
|
||||
|
||||
echo "#!/bin/bash" > $2/startup-run
|
||||
echo "$1/tools/auto-pull.sh" >> $2/startup-run
|
||||
echo "gnome-terminal -- bash -c \"echo sjturm | sudo -S $1/tools/monitor.sh \\\"$2/run --run-with-camera --save-video --wait-uart\\\"\"" >> $2/startup-run
|
||||
echo "gnome-terminal -- bash -c \"echo sjturm | sudo -S $1/tools/monitor.sh \\\"$2/run --run-with-camera --save-video --wait-uart --save-labelled-boxes --show-armor-box\\\"\"" >> $2/startup-run
|
||||
chmod +x $2/startup-run
|
||||
|
||||
Reference in New Issue
Block a user