Closed
Bug 754199
Opened 13 years ago
Closed 7 years ago
Support Ambient light sensor for Windows 7
Categories
(Core :: Hardware Abstraction Layer (HAL), defect)
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: m_kato, Assigned: m_kato)
References
Details
Attachments
(1 file)
6.36 KB,
patch
|
dougt
:
review+
|
Details | Diff | Splinter Review |
I have the PC that has ambient light sensor... We can get it using Sensor API (from Windows 7 or later).
Assignee | ||
Comment 1•13 years ago
|
||
Assignee | ||
Updated•13 years ago
|
Attachment #623602 -
Flags: review?(doug.turner)
Comment 2•13 years ago
|
||
Comment on attachment 623602 [details] [diff] [review] fix Review of attachment 623602 [details] [diff] [review]: ----------------------------------------------------------------- Looks fine. Let me know about the filter. Fix the other two nits if you like. ::: hal/windows/WindowsSensor.cpp @@ +118,5 @@ > + HRESULT hr; > + InfallibleTArray<float> values; > + > + // Illuminance level, in lux > + hr = aReport->GetSensorValue(SENSOR_DATA_TYPE_LIGHT_LEVEL_LUX, &v); do you know why they are running a filter over the sensor data in this example: http://msdn.microsoft.com/en-us/library/windows/desktop/dd318933%28v=vs.85%29.aspx @@ +140,5 @@ > { > + // Currently implementation is acceleration and ambient light only. > + if ((aSensor == SENSOR_ACCELERATION && sAccelerometer) || > + (aSensor == SENSOR_LIGHT && sLight) || > + (aSensor != SENSOR_ACCELERATION && aSensor != SENSOR_LIGHT)) { This if statement is kind of hard to follow. I would have two statements - one that just tests if we aren't SENSOR_ACCELERATION or SENSOR_LIGHT. Have that return early. if (aSensor != SENSOR_LIGHT || aSensor != SENSOR_ACCELERATION) { return; } if ((aSensor == SENSOR_ACCELERATION && !sAccelerometer) || (aSensor == SENSOR_LIGHT && !sLight) { ... Up to you. @@ +194,5 @@ > + getter_AddRefs(values)))) { > + if (SUCCEEDED(values->SetUnsignedIntegerValue( > + SENSOR_PROPERTY_CURRENT_REPORT_INTERVAL, > + DEFAULT_SENSOR_POLL))) { > + nsRefPtr<IPortableDeviceValues> returns; While we are here, lets rename returns to result.
Attachment #623602 -
Flags: review?(doug.turner) → review+
Comment 3•12 years ago
|
||
What happened to this patch? Are you still working on it, Makoto?
Assignee | ||
Comment 4•12 years ago
|
||
ah, I forget this bug. I will rebase.
Comment 5•10 years ago
|
||
Hi Makoto, again one year over -> patch will come in next time?
Flags: needinfo?(m_kato)
Updated•10 years ago
|
Keywords: dev-doc-needed
Assignee | ||
Comment 6•10 years ago
|
||
(In reply to Stefan Weiss [:sir_none] from comment #5) > Hi Makoto, > again one year over -> patch will come in next time? I will work this next week
Flags: needinfo?(m_kato)
Assignee | ||
Comment 7•7 years ago
|
||
This feature will be turned off, so I mark as wontfix.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
Updated•7 years ago
|
Keywords: dev-doc-needed
You need to log in
before you can comment on or make changes to this bug.
Description
•