// Path: android/app/src/main/java/me/pjq/rpicar/utils/Log.java
// public class Log {
//     static String dateFormat = "yyyy-MM-dd hh:mm:ss";
//     static SimpleDateFormat fm = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss.SSS");
//     static boolean showLog = true;
// 
//     public static void log(String tag, String msg) {
//         if (showLog) {
//             String source = null;
//             try {
//                 StackTraceElement st = Thread.currentThread().getStackTrace()[2];
//                 source = "[" + st.getFileName() + "] - " + st.getMethodName() + "("
//                         + st.getLineNumber() + ")";
//             } catch (Exception e) {
//             }
// 
//             System.out.println(fm.format(new Date()) + " - " + source + ":" + msg);
//         }
//     }
// }


import java.io.*;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Properties;
import me.pjq.rpicar.utils.Log;
package me.pjq.rpicar;



public enum Constants {
    INSTANCE;
    private static final String TAG = "Constants";
    public static String deviceName = "RpiCarHome";
    public static String productKey = "tKB3pmbLvnA";
    public static String secret = "fT9ryVgfucZNs2g0VZkj8kzV3eNjY55E";

//    public static String deviceName = "RpiCarClient";
//    public static String productKey = "tKB3pmbLvnA";
//    public static String secret = "w7TT5kvx1xdzfVogH7RfUUto4kWoSCq4";

    public static String aK1="LTAICKNMlWB";
    public static String aK2="xm7GR";
    public static String accessKeyId = "LTAICKNMlWBxm7GR";
    public static String accessKeySecret = "cMgi0pjAewppBdpESDlI3CXZpAKFwc";
    public static String phone = "18621517768";
    public static String signName = "树霉派IoT";
    public static String templateCode = "SMS_110310049";

    public static String pubTopic = "/" + productKey + "/" + deviceName + "/update";
    //用于测试的topic
    public static String subTopic = "/" + productKey + "/" + deviceName + "/get";

//    private static final String CONFIG_FILE = "./src/main/resources/config.properties";
    private static final String CONFIG_FILE = "config.properties";

    //10 seconds, interval for SensorStatus update.
    public static final long SENSOR_STATUS_UPDATE_INTERVAL = 10000;
    //    long RELAY_OFF_INTERVAL = 5 * 60 * 1000;
    // duration for auto turn off the power via relay control
    public static long RELAY_OFF_INTERVAL = 30 * 1000;


    private Constants() {
        try {
// Path: android/app/src/main/java/me/pjq/rpicar/utils/Log.java
// public class Log {
//     static String dateFormat = "yyyy-MM-dd hh:mm:ss";
//     static SimpleDateFormat fm = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss.SSS");
//     static boolean showLog = true;
// 
//     public static void log(String tag, String msg) {
//         if (showLog) {
//             String source = null;
//             try {
//                 StackTraceElement st = Thread.currentThread().getStackTrace()[2];
//                 source = "[" + st.getFileName() + "] - " + st.getMethodName() + "("
//                         + st.getLineNumber() + ")";
//             } catch (Exception e) {
//             }
// 
//             System.out.println(fm.format(new Date()) + " - " + source + ":" + msg);
//         }
//     }
// }


// Path: android/app/src/main/java/me/pjq/rpicar/Constants.java
import java.io.*;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Properties;
import me.pjq.rpicar.utils.Log;

package me.pjq.rpicar;



public enum Constants {
    INSTANCE;
    private static final String TAG = "Constants";
    public static String deviceName = "RpiCarHome";
    public static String productKey = "tKB3pmbLvnA";
    public static String secret = "fT9ryVgfucZNs2g0VZkj8kzV3eNjY55E";

//    public static String deviceName = "RpiCarClient";
//    public static String productKey = "tKB3pmbLvnA";
//    public static String secret = "w7TT5kvx1xdzfVogH7RfUUto4kWoSCq4";

    public static String aK1="LTAICKNMlWB";
    public static String aK2="xm7GR";
    public static String accessKeyId = "LTAICKNMlWBxm7GR";
    public static String accessKeySecret = "cMgi0pjAewppBdpESDlI3CXZpAKFwc";
    public static String phone = "18621517768";
    public static String signName = "树霉派IoT";
    public static String templateCode = "SMS_110310049";

    public static String pubTopic = "/" + productKey + "/" + deviceName + "/update";
    //用于测试的topic
    public static String subTopic = "/" + productKey + "/" + deviceName + "/get";

//    private static final String CONFIG_FILE = "./src/main/resources/config.properties";
    private static final String CONFIG_FILE = "config.properties";

    //10 seconds, interval for SensorStatus update.
    public static final long SENSOR_STATUS_UPDATE_INTERVAL = 10000;
    //    long RELAY_OFF_INTERVAL = 5 * 60 * 1000;
    // duration for auto turn off the power via relay control
    public static long RELAY_OFF_INTERVAL = 30 * 1000;


    private Constants() {
        try {
            Log.log(TAG, "init: " + CONFIG_FILE);