Remove some warnings.
Original from: Dominik Wawrzonek <dwawrzonek@ics.com>
Bug-AGL: SPEC-4971
Change-Id: I3693fa74f7995b4dcb016812403ed800702cb81c
Signed-off-by: Lisandro Pérez Meyer <lpmeyer@ics.com>
'Please use the IVI system responsibly while driving. Keep your attention on the road, and use voice commands or hands-free controls when interacting with the system. Distracted driving can lead to accidents and serious injury. Follow all traffic laws and drive safely.';
const aglVeriosn = 'AGL 16.0.2 (pike)';
const kernelVeriosn = 'Kernel: 5.10.41.-yocto-standard';
-const maxFuelLevel = 55.0;
+const maxFuelLevel = 100.0;
const maxSpeed = 240.0;
const maxRpm = 8000;
final GlobalKey<ScaffoldState> homeScaffoldKey = GlobalKey();
static const String vehicleOutsideTemperature =
'Vehicle.Exterior.AirTemperature';
static const String vehicleRange = 'Vehicle.Powertrain.FuelSystem.Range';
- static const String vehicleFuelLevel = 'Vehicle.OBD.FuelLevel';
+ static const String vehicleFuelLevel =
+ 'Vehicle.Powertrain.FuelSystem.RelativeLevel';
static const String vehicleMediaVolume =
'Vehicle.Cabin.Infotainment.Media.Volume';
static const String vehicleIsChildLockActiveLeft =
+// ignore_for_file: unused_local_variable
+
import '../../export.dart';
class HybridNotifier extends StateNotifier<Hybrid> {
// currentState = HybridState.baterryOutput;
// }
- // Zaktualizuj stan
+ // Update hybrid state
if (currentState != previousState) {
state = state.copyWith(hybridState: currentState);
}
+// ignore_for_file: unused_local_variable
+
import 'dart:async';
import 'package:flutter_ics_homescreen/export.dart';
}
break;
case VSSPath.vehicleFuelLevel:
- if (update.entry.value.hasFloat()) {
- state = state.copyWith(fuelLevel: update.entry.value.float);
+ if (update.entry.value.hasUint32()) {
+ state = state.copyWith(fuelLevel: update.entry.value.uint32);
}
break;
// case VSSPath.vehicleMediaVolume:
// });
}
try {
- // ignore: unused_local_variable
Map<String, String> metadata = {};
//var responseStream = _stub.subscribe(request);
stub.subscribe(request).listen((value) async {
actualFuelLevel = actualFuelLevel + 1;
if (actualFuelLevel > fuelLevel) {
- actualFuelLevel = fuelLevel;
+ actualFuelLevel = fuelLevel.toDouble();
timer.cancel();
}
- state = state.copyWith(fuelLevel: actualFuelLevel);
+ state = state.copyWith(fuelLevel: actualFuelLevel.toInt());
});
Timer outsideTemperatureTimer =
Timer.periodic(const Duration(milliseconds: 300), (timer) {
final double insideTemperature;
final double outsideTemperature;
final int range;
- final double fuelLevel;
+ final int fuelLevel;
final int mediaVolume;
final bool isChildLockActiveLeft;
final bool isChildLockActiveRight;
insideTemperature = 25,
outsideTemperature = 32.0,
range = 21,
- fuelLevel = 49.5,
+ fuelLevel = 49,
mediaVolume = 50,
isChildLockActiveLeft = false,
isChildLockActiveRight = true,
double? insideTemperature,
double? outsideTemperature,
int? range,
- double? fuelLevel,
+ int? fuelLevel,
int? mediaVolume,
bool? isChildLockActiveLeft,
bool? isChildLockActiveRight,
void main() async {
WidgetsFlutterBinding.ensureInitialized();
- // MediaKit.ensureInitialized(); //replace with lottie
runApp(DevicePreview(
enabled: false,
tools: const [
-import 'package:flutter_ics_homescreen/data/models/hybrid.dart';
import 'package:flutter_ics_homescreen/export.dart';
import 'package:flutter_ics_homescreen/presentation/screens/apps/widgets/app_button.dart';
width: 220,
child: CustomPaint(
foregroundPainter: CirclePainter(
- value: fuelLevel,
+ value: fuelLevel.toDouble(),
maxValue: maxFuelLevel,
isFuel: true,
isRPM: false),
width: 452,
text: 'Continue',
onTap: () {
- ref.read(vehicleProvider.notifier).setInitialState();
+ // ref.read(vehicleProvider.notifier).setInitialState();
ref
.read(appProvider.notifier)
.update((state) => state = AppState.dashboard);
protos:
dependency: "direct main"
description:
- path: "./protos"
+ path: protos
relative: true
source: path
version: "1.0.0"