Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

M121 (v1.3.8) #51

Merged
merged 3 commits into from
Dec 21, 2023
Merged
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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cros-dpsl-js",
"version": "1.3.7",
"version": "1.3.8",
"description": "Diagnostics processor support library for Chrome OS",
"main": "./src/dpsl.js",
"exports": "./src/dpsl.js",
Expand Down
9 changes: 7 additions & 2 deletions src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ Source:
| refreshRate | number | Refresh rate |
| manufacturer | string | Three letter manufacturer ID |
| modelId | number | Manufacturer product code |
| serialNumber | number | 32 bits serial number |
| serialNumber | number | 32 bits serial number. Starting from M120, this field is always empty due to privacy requirements. |
| manufactureWeek | number | Week of manufacture |
| manufactureYear | number | Year of manufacture |
| edidVersion | string | EDID version |
Expand All @@ -445,7 +445,7 @@ Source:
| refreshRate | number | Refresh rate |
| manufacturer | string | Three letter manufacturer ID |
| modelId | number | Manufacturer product code |
| serialNumber | number | 32 bits serial number |
| serialNumber | number | 32 bits serial number. Starting from M120, this field is always empty due to privacy requirements. |
| manufactureWeek | number | Week of manufacture |
| manufactureYear | number | Year of manufacture |
| edidVersion | string | EDID version |
Expand Down Expand Up @@ -562,3 +562,8 @@ Source:
| runBluetoothDiscoveryRoutine | () => Promise\<Routine\> | `os.diagnostics` | 1.3.7 |
| runBluetoothScanningRoutine | (params: BluetoothScanningRoutineParams) => Promise\<Routine\> | `os.diagnostics`, `os.bluetooth_peripherals_info` | 1.3.7 |
| runBluetoothPairingRoutine | (params: BluetoothPairingRoutineParams) => Promise\<Routine\> | `os.diagnostics`, `os.bluetooth_peripherals_info` | 1.3.7 |

### dpsl.diagnostics.fan.*
| Function Name | Definition | Permission needed to access | Released in `dpsl` version |
------------ | ------------- | ------------- | ------------- |
| runFanRoutine | () => Promise\<Routine\> | `os.diagnostics` | 1.3.8 |
4 changes: 4 additions & 0 deletions src/__tests__/dpsl.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -683,6 +683,10 @@ describe('dpsl.diagnostics tests', () => {
.runBluetoothPairingRoutine,
'chromeOsRoutineFunction': 'runBluetoothPairingRoutine',
},
{
'dpslRoutineFunction': dpsl.diagnostics.fan.runFanRoutine,
'chromeOsRoutineFunction': 'runFanRoutine',
},
];

testCases.forEach((testCase) => {
Expand Down
27 changes: 27 additions & 0 deletions src/diagnostics_manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -664,6 +664,27 @@ class BluetoothManager {
}
}

/**
* Diagnostics fan Manager for dpsl.diagnostics.fan.* APIs.
*/
class FanManager {
/**
* Runs fan test. This routine checks whether the fan can be controlled.
* @return { !Promise<!Routine> }
* @public
*/
async runFanRoutine() {
const functionName = 'runFanRoutine';
if (!isSupported(functionName)) {
throw new MethodNotFoundError(API_NAME, functionName,
/* chromeVersion */ 121);
}

return chrome.os.diagnostics.runFanRoutine().then(
(response) => new Routine(response.id));
}
}

/**
* DPSL Diagnostics Manager for dpsl.diagnostics.* APIs.
*/
Expand Down Expand Up @@ -749,6 +770,12 @@ class DPSLDiagnosticsManager {
* @public
*/
this.bluetooth = new BluetoothManager();

/**
* @type {!FanManager}
* @public
*/
this.fan = new FanManager();
}

/**
Expand Down
Loading