Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 0 additions & 28 deletions src/core/app_state.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,6 @@ void app_switch_to_menu() {

rtc6715.init(0, 0);
system_script(REC_STOP_LIVE);

#ifdef HDZBOXPRO
// Restore image settings from av module
screen.brightness(g_setting.image.oled);
Set_Contrast(g_setting.image.contrast);
#endif
}

void app_exit_menu() {
Expand Down Expand Up @@ -100,11 +94,6 @@ void app_switch_to_analog(bool is_av_in) {
if (is_av_in) {
rtc6715.init(0, 0);
} else {
#if defined HDZBOXPRO
// Solve LCD residual image
screen.brightness(7);
Set_Contrast(14);
#endif
rtc6715.init(1, g_setting.record.audio_source == SETTING_RECORD_AUDIO_SOURCE_AV_IN);
rtc6715.set_ch(g_setting.source.analog_channel - 1);
}
Expand All @@ -124,12 +113,6 @@ void app_switch_to_hdmi_in() {
#if defined HDZGOGGLE2
system_exec("aww 0x0300b084 0x0001555");
#endif

#if defined HDZBOXPRO
// Restore image settings from av module
screen.brightness(g_setting.image.oled);
Set_Contrast(g_setting.image.contrast);
#endif
rtc6715.init(0, 0);

Source_HDMI_in();
Expand Down Expand Up @@ -170,11 +153,6 @@ void app_switch_to_hdzero(bool is_default) {
system_exec("aww 0x0300b084 0x0001555");
#endif

#if defined HDZBOXPRO
// Restore image settings from av module
screen.brightness(g_setting.image.oled);
Set_Contrast(g_setting.image.contrast);
#endif
rtc6715.init(0, 0);

if (is_default) {
Expand Down Expand Up @@ -247,12 +225,6 @@ void app_switch_to_hdzero(bool is_default) {
void hdzero_switch_channel(int channel) {
channel &= 0x7f;

#if defined HDZBOXPRO
// Restore image settings from av module
screen.brightness(g_setting.image.oled);
Set_Contrast(g_setting.image.contrast);
#endif

LOGI("hdzero_switch_channel to bw:%d, band:%d, ch:%d, CAM_MODE=%d 4:3=%d", g_setting.source.hdzero_bw, g_setting.source.hdzero_band, channel, CAM_MODE, cam_4_3);
DM6302_SetChannel(g_setting.source.hdzero_band, channel);
DM5680_clear_vldflg();
Expand Down
13 changes: 0 additions & 13 deletions src/core/ht.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,7 @@ static void detect_motion(bool is_moving) {
#endif
if (is_moving) {
// we got motion, turn oled back on, start over
#if defined(HDZGOGGLE) || defined(HDZGOGGLE2)
screen.brightness(g_setting.image.oled);
#elif defined(HDZBOXPRO)
if (g_source_info.source == SOURCE_AV_MODULE) {
screen.brightness(7);
} else {
screen.brightness(g_setting.image.oled);
}
#endif
state = OLED_MD_DETECTING;
cnt = 0;
}
Expand Down Expand Up @@ -153,11 +145,6 @@ static void detect_motion(bool is_moving) {
LOGI("OLED ON from protection.");

screen.brightness(g_setting.image.oled);
#ifdef HDZBOXPRO
if (g_source_info.source == SOURCE_AV_MODULE) {
screen.brightness(7);
}
#endif

hw_screen_on(1);
state = OLED_MD_DETECTING;
Expand Down
2 changes: 1 addition & 1 deletion src/driver/hardware-boxpro.c
Original file line number Diff line number Diff line change
Expand Up @@ -988,7 +988,7 @@ void Set_Brightness(uint8_t bri) {
}

void Set_Contrast(uint8_t con) {
int8_t val = con << 2;
int8_t val = con * 255 / 48;
I2C_Write(ADDR_FPGA, 0x86, val);
}

Expand Down
16 changes: 10 additions & 6 deletions src/driver/tp2825-boxpro.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,18 @@ void TP2825_init(bool is_av_in, bool is_pal) {
I2C_Write(ADDR_TP2825, 0x0B, 0xD0);
}

I2C_Write(ADDR_TP2825, 0x10, 0x10);
I2C_Write(ADDR_TP2825, 0x11, 0x48);
// I2C_Write(ADDR_TP2825, 0x12, 0x51);
// I2C_Write(ADDR_TP2825, 0x13, 0x80);
// I2C_Write(ADDR_TP2825, 0x14, 0x80);
I2C_Write(ADDR_TP2825, 0x10, 0x12); // brightness
I2C_Write(ADDR_TP2825, 0x11, 0x34); // contrast
// I2C_Write(ADDR_TP2825, 0x12, 0x51); // sharpness? bit 3-0 strength
I2C_Write(ADDR_TP2825, 0x13, 0x50); // hue
// I2C_Write(ADDR_TP2825, 0x14, 0x80); // saturation
// I2C_Write(ADDR_TP2825, 0x15, 0x00);
// I2C_Write(ADDR_TP2825, 0x17, 0x00); // sharpness? bit 3-0 strength
// I2C_Write(ADDR_TP2825, 0x19, 0x00); // black blamp bit 7: pedestal En
// 6-4: clamp filter/speed
// 3-0: calibration/offset

I2C_Write(ADDR_TP2825, 0x25, 0x28);
I2C_Write(ADDR_TP2825, 0x25, 0x60); // AGC/Peak white clamping

I2C_Write(ADDR_TP2825, 0x06, 0x80);

Expand Down