2020-04-27 21:44:29 -04:00
|
|
|
|
using Ryujinx.Common.Logging;
|
|
|
|
|
using Ryujinx.HLE.HOS.Services.Ptm.Ts.Types;
|
|
|
|
|
|
|
|
|
|
namespace Ryujinx.HLE.HOS.Services.Ptm.Ts
|
2019-09-18 20:45:11 -04:00
|
|
|
|
{
|
|
|
|
|
[Service("ts")]
|
|
|
|
|
class IMeasurementServer : IpcService
|
|
|
|
|
{
|
2020-04-27 21:44:29 -04:00
|
|
|
|
private const uint DefaultTemperature = 42000u;
|
|
|
|
|
|
2019-09-18 20:45:11 -04:00
|
|
|
|
public IMeasurementServer(ServiceCtx context) { }
|
2020-04-27 21:44:29 -04:00
|
|
|
|
|
|
|
|
|
[Command(3)]
|
|
|
|
|
// GetTemperatureMilliC(Location location) -> u32
|
|
|
|
|
public ResultCode GetTemperatureMilliC(ServiceCtx context)
|
|
|
|
|
{
|
|
|
|
|
Location location = (Location)context.RequestData.ReadByte();
|
|
|
|
|
|
|
|
|
|
Logger.PrintStub(LogClass.ServicePtm, new { location });
|
|
|
|
|
|
|
|
|
|
context.ResponseData.Write(DefaultTemperature);
|
|
|
|
|
|
|
|
|
|
return ResultCode.Success;
|
|
|
|
|
}
|
2019-09-18 20:45:11 -04:00
|
|
|
|
}
|
|
|
|
|
}
|