File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -83,6 +83,8 @@ static uint8_t* _frame_buffer;
83
83
void ssd1312_configure (uint8_t * buf )
84
84
{
85
85
_frame_buffer = buf ;
86
+ oled_writer_write_cmd (SSD1312_CMD_SET_LOW_COL (0 ));
87
+ oled_writer_write_cmd (SSD1312_CMD_SET_HIGH_COL (0 ));
86
88
oled_writer_write_cmd (SSD1312_CMD_SET_DISPLAY_OFF );
87
89
oled_writer_write_cmd_with_param (SSD1312_CMD_SET_CONTRAST_CONTROL , 0xff );
88
90
oled_writer_write_cmd_with_param (
@@ -118,6 +120,12 @@ void ssd1312_update(void)
118
120
/* The SSD1312 has one page per 8 rows. One page is 128 bytes. Every byte is 8 rows */
119
121
for (size_t i = 0 ; i < 64 / 8 ; i ++ ) {
120
122
oled_writer_write_cmd (SSD1312_CMD_SET_PAGE_START_ADDRESS (i ));
123
+ // Explicitly set column address to 0 during initialization and screen updates to resolve
124
+ // intermittent ~20px horizontal offset and wrapping, which was experienced on one Nova
125
+ // device so far. This fixes the symptom, not the underlying issue, as we expect the column
126
+ // address to be correct if all bytes arrive at the screen.
127
+ oled_writer_write_cmd (SSD1312_CMD_SET_LOW_COL (0 ));
128
+ oled_writer_write_cmd (SSD1312_CMD_SET_HIGH_COL (0 ));
121
129
oled_writer_write_data (& _frame_buffer [i * 128 ], 128 );
122
130
}
123
131
}
You can’t perform that action at this time.
0 commit comments