genesys: Record data that is important for shading data upload

merge-requests/241/head
Povilas Kanapickas 2019-10-26 12:42:50 +02:00
rodzic 67588e46ef
commit e2e72535b5
5 zmienionych plików z 25 dodań i 0 usunięć

Wyświetl plik

@ -1719,6 +1719,14 @@ void CommandSetGl124::send_shading_data(Genesys_Device* dev, const Genesys_Senso
segcnt*=2*2;
pixels=endpixel-strpixel;
dev->interface->record_key_value("shading_start_pixel", std::to_string(strpixel));
dev->interface->record_key_value("shading_pixels", std::to_string(pixels));
dev->interface->record_key_value("shading_length", std::to_string(length));
dev->interface->record_key_value("shading_factor", std::to_string(factor));
dev->interface->record_key_value("shading_segcnt", std::to_string(segcnt));
dev->interface->record_key_value("shading_segment_count",
std::to_string(dev->session.segment_count));
DBG( DBG_io2, "%s: using chunks of %d bytes (%d shading data pixels)\n",__func__,length, length/4);
std::vector<uint8_t> buffer(pixels * dev->session.segment_count, 0);

Wyświetl plik

@ -4013,6 +4013,10 @@ void CommandSetGl841::send_shading_data(Genesys_Device* dev, const Genesys_Senso
beginpixel = (strpixel-beginpixel*2*2)/factor;
DBG(DBG_io2, "%s: BEGIN PIXEL=%d\n", __func__, beginpixel/4);
dev->interface->record_key_value("shading_offset", std::to_string(beginpixel));
dev->interface->record_key_value("shading_pixels", std::to_string(pixels));
dev->interface->record_key_value("shading_length", std::to_string(length));
DBG(DBG_io2, "%s: using chunks of %d bytes (%d shading data pixels)\n", __func__, length,
length/4);
std::vector<uint8_t> buffer(pixels, 0);

Wyświetl plik

@ -3374,6 +3374,9 @@ void CommandSetGl843::send_shading_data(Genesys_Device* dev, const Genesys_Senso
startx);
}
dev->interface->record_key_value("shading_offset", std::to_string(offset));
dev->interface->record_key_value("shading_length", std::to_string(length));
/* compute and allocate size for final data */
final_size = ((length+251) / 252) * 256;
DBG(DBG_io, "%s: final shading size=%04x (length=%d)\n", __func__, final_size, length);

Wyświetl plik

@ -1466,6 +1466,11 @@ void CommandSetGl846::send_shading_data(Genesys_Device* dev, const Genesys_Senso
strpixel*=2*2;
pixels*=2*2;
dev->interface->record_key_value("shading_offset", std::to_string(strpixel));
dev->interface->record_key_value("shading_pixels", std::to_string(pixels));
dev->interface->record_key_value("shading_length", std::to_string(length));
dev->interface->record_key_value("shading_factor", std::to_string(factor));
std::vector<uint8_t> buffer(pixels, 0);
DBG(DBG_io2, "%s: using chunks of %d (0x%04x) bytes\n", __func__, pixels, pixels);

Wyświetl plik

@ -1499,6 +1499,11 @@ void CommandSetGl847::send_shading_data(Genesys_Device* dev, const Genesys_Senso
strpixel*=2*2;
pixels*=2*2;
dev->interface->record_key_value("shading_offset", std::to_string(strpixel));
dev->interface->record_key_value("shading_pixels", std::to_string(pixels));
dev->interface->record_key_value("shading_length", std::to_string(length));
dev->interface->record_key_value("shading_factor", std::to_string(factor));
std::vector<uint8_t> buffer(pixels, 0);
DBG(DBG_io2, "%s: using chunks of %d (0x%04x) bytes\n", __func__, pixels, pixels);