瀏覽代碼

Use NEW_POWER to update output state

We don't need to update the source's capabilities when setting our
output state.  Now we just send a new Request.  For now, that request is
redundant, but soon I want to make the Sink request less current when
the output is disabled.  Whether the voltage should be the same or
always vSafe5V in that case, I haven't decided yet.  There are
advantages to each, but the difference is so minor in terms of using the
device that I don't see a reason to let the user choose, which of course
puts the decision on me.
Clara Hobbs 7 年之前
父節點
當前提交
377b2da4fe
共有 1 個檔案被更改,包括 2 行新增2 行删除
  1. 2
    2
      src/shell.c

+ 2
- 2
src/shell.c 查看文件

@@ -329,10 +329,10 @@ static void cmd_output(BaseSequentialStream *chp, int argc, char *argv[])
329 329
         /* Set the output status and re-negotiate power */
330 330
         if (strcmp(argv[0], "enable") == 0) {
331 331
             pdb_dpm_output_enabled = true;
332
-            chEvtSignal(pdb_pe_thread, PDB_EVT_PE_GET_SOURCE_CAP);
332
+            chEvtSignal(pdb_pe_thread, PDB_EVT_PE_NEW_POWER);
333 333
         } else if (strcmp(argv[0], "disable") == 0) {
334 334
             pdb_dpm_output_enabled = false;
335
-            chEvtSignal(pdb_pe_thread, PDB_EVT_PE_GET_SOURCE_CAP);
335
+            chEvtSignal(pdb_pe_thread, PDB_EVT_PE_NEW_POWER);
336 336
         } else {
337 337
             /* Or, if the argument was invalid, print a usage message */
338 338
             chprintf(chp, "Usage: output [enable|disable]\r\n");

Loading…
取消
儲存