dumpstate: support CM2 data dump for touch.

This also change the sequence of run_rawcap_read_all
and run_self_rawcap_read_all to last. Because these
two commands need to run selftest first to read data,
this will make ambient update to make other raw data with
differen baseline.

Bug: 195111369
Test: check touch data in bugreport.
Signed-off-by: Super Liu <supercjliu@google.com>
Change-Id: I4693b099fbc98d80fbe166525773e3ab803c98d8
This commit is contained in:
Super Liu 2021-08-03 08:34:59 +00:00 committed by TreeHugger Robot
parent 4f62d6b733
commit d3e2787491

View file

@ -648,20 +648,6 @@ void DumpstateDevice::dumpTouchSection(int fd) {
lsi_spi_path, lsi_spi_path); lsi_spi_path, lsi_spi_path);
RunCommandToFd(fd, "Self Strength", {"/vendor/bin/sh", "-c", cmd}); RunCommandToFd(fd, "Self Strength", {"/vendor/bin/sh", "-c", cmd});
// Raw cap
snprintf(cmd, sizeof(cmd),
"echo %s > %s/cmd && cat %s/cmd_result",
"run_rawcap_read_all",
lsi_spi_path, lsi_spi_path);
RunCommandToFd(fd, "Mutual Raw Cap", {"/vendor/bin/sh", "-c", cmd});
// Self raw cap
snprintf(cmd, sizeof(cmd),
"echo %s > %s/cmd && cat %s/cmd_result",
"run_self_rawcap_read_all",
lsi_spi_path, lsi_spi_path);
RunCommandToFd(fd, "Self Raw Cap", {"/vendor/bin/sh", "-c", cmd});
// TYPE_AMBIENT_DATA // TYPE_AMBIENT_DATA
snprintf(cmd, sizeof(cmd), snprintf(cmd, sizeof(cmd),
"echo %s > %s/cmd && cat %s/cmd_result", "echo %s > %s/cmd && cat %s/cmd_result",
@ -697,6 +683,27 @@ void DumpstateDevice::dumpTouchSection(int fd) {
lsi_spi_path, lsi_spi_path); lsi_spi_path, lsi_spi_path);
RunCommandToFd(fd, "TYPE_NOI_P2P_MAX", {"/vendor/bin/sh", "-c", cmd}); RunCommandToFd(fd, "TYPE_NOI_P2P_MAX", {"/vendor/bin/sh", "-c", cmd});
// Raw cap
snprintf(cmd, sizeof(cmd),
"echo %s > %s/cmd && cat %s/cmd_result",
"run_rawcap_read_all",
lsi_spi_path, lsi_spi_path);
RunCommandToFd(fd, "Mutual Raw Cap", {"/vendor/bin/sh", "-c", cmd});
// Self raw cap
snprintf(cmd, sizeof(cmd),
"echo %s > %s/cmd && cat %s/cmd_result",
"run_self_rawcap_read_all",
lsi_spi_path, lsi_spi_path);
RunCommandToFd(fd, "Self Raw Cap", {"/vendor/bin/sh", "-c", cmd});
// CM2
snprintf(cmd, sizeof(cmd),
"echo %s > %s/cmd && cat %s/cmd_result",
"run_rawcap_high_freq_read_all",
lsi_spi_path, lsi_spi_path);
RunCommandToFd(fd, "CM2", {"/vendor/bin/sh", "-c", cmd});
// Disable: force touch active // Disable: force touch active
snprintf(cmd, sizeof(cmd), snprintf(cmd, sizeof(cmd),
"echo %s > %s/cmd && cat %s/cmd_result", "echo %s > %s/cmd && cat %s/cmd_result",