2020-04-28 01:44:29 +00:00
|
|
|
|
using Ryujinx.Common.Logging;
|
|
|
|
|
using Ryujinx.HLE.HOS.Services.Ptm.Ts.Types;
|
|
|
|
|
|
|
|
|
|
namespace Ryujinx.HLE.HOS.Services.Ptm.Ts
|
2019-09-19 00:45:11 +00:00
|
|
|
|
{
|
|
|
|
|
[Service("ts")]
|
|
|
|
|
class IMeasurementServer : IpcService
|
|
|
|
|
{
|
2020-04-28 01:44:29 +00:00
|
|
|
|
private const uint DefaultTemperature = 42000u;
|
|
|
|
|
|
2019-09-19 00:45:11 +00:00
|
|
|
|
public IMeasurementServer(ServiceCtx context) { }
|
2020-04-28 01:44:29 +00:00
|
|
|
|
|
2021-04-13 22:01:24 +00:00
|
|
|
|
[CommandHipc(3)]
|
2020-04-28 01:44:29 +00:00
|
|
|
|
// GetTemperatureMilliC(Location location) -> u32
|
|
|
|
|
public ResultCode GetTemperatureMilliC(ServiceCtx context)
|
|
|
|
|
{
|
|
|
|
|
Location location = (Location)context.RequestData.ReadByte();
|
|
|
|
|
|
2020-08-03 23:32:53 +00:00
|
|
|
|
Logger.Stub?.PrintStub(LogClass.ServicePtm, new { location });
|
2020-04-28 01:44:29 +00:00
|
|
|
|
|
|
|
|
|
context.ResponseData.Write(DefaultTemperature);
|
|
|
|
|
|
|
|
|
|
return ResultCode.Success;
|
|
|
|
|
}
|
2019-09-19 00:45:11 +00:00
|
|
|
|
}
|
|
|
|
|
}
|