diff --git a/app/src/main/java/io/pslab/activity/MainActivity.java b/app/src/main/java/io/pslab/activity/MainActivity.java index a15250bea..18ea61ab6 100644 --- a/app/src/main/java/io/pslab/activity/MainActivity.java +++ b/app/src/main/java/io/pslab/activity/MainActivity.java @@ -52,6 +52,7 @@ import io.pslab.fragment.HomeFragment; import io.pslab.fragment.InstrumentsFragment; import io.pslab.fragment.PSLabPinLayoutFragment; +import io.pslab.fragment.PSLabPinLayoutFragment_v6; import io.pslab.others.CustomSnackBar; import io.pslab.others.CustomTabService; import io.pslab.others.InitializationVariable; @@ -86,6 +87,7 @@ public class MainActivity extends AppCompatActivity { private static final String TAG_INSTRUMENTS = "instruments"; private static final String TAG_ABOUTUS = "aboutUs"; private static final String TAG_PINLAYOUT = "pinLayout"; + private static final String TAG_PINLAYOUT_V6 = "pinlayoutv6"; private static final String TAG_FAQ = "faq"; private static String CURRENT_TAG = TAG_INSTRUMENTS; private String[] activityTitles; @@ -337,6 +339,7 @@ public boolean onNavigationItemSelected(@NonNull MenuItem item) { OssLicensesMenuActivity.setActivityTitle(getString(R.string.third_party_libs)); startActivity(new Intent(MainActivity.this, OssLicensesMenuActivity.class)); break; + default: navItemIndex = 0; } @@ -429,14 +432,23 @@ public boolean onOptionsItemSelected(MenuItem item) { case R.id.menu_pslab_disconnected: attemptToConnectPSLab(); break; - case R.id.menu_pslab_layout_front: + case R.id.menu_pslab_layout_front_v5: PSLabPinLayoutFragment.frontSide = true; - displayPSLabPinLayout(); + displayPSLabPinLayout(TAG_PINLAYOUT); break; - case R.id.menu_pslab_layout_back: + case R.id.menu_pslab_layout_back_v5: PSLabPinLayoutFragment.frontSide = false; - displayPSLabPinLayout(); + displayPSLabPinLayout(TAG_PINLAYOUT); + break; + case R.id.menu_pslab_layout_front_v6: + PSLabPinLayoutFragment_v6.topside = true; + displayPSLabPinLayout(TAG_PINLAYOUT_V6); + break; + case R.id.menu_pslab_layout_back_v6: + PSLabPinLayoutFragment_v6.topside = false; + displayPSLabPinLayout(TAG_PINLAYOUT_V6); break; + default: break; } @@ -465,20 +477,36 @@ private void attemptToConnectPSLab() { } } - private void displayPSLabPinLayout() { - CURRENT_TAG = TAG_PINLAYOUT; + private void displayPSLabPinLayout(String fragmentTag) { + CURRENT_TAG = fragmentTag; navigationView.getMenu().getItem(navItemIndex).setChecked(false); - setToolbarTitle(getResources().getString(R.string.pslab_pinlayout)); + + // Set toolbar title based on the fragment tag + if (fragmentTag.equals(TAG_PINLAYOUT)) { + setToolbarTitle(getResources().getString(R.string.pslab_pinlayout)); + } else if (fragmentTag.equals(TAG_PINLAYOUT_V6)) { + setToolbarTitle(getResources().getString(R.string.pslab_pinlayout_v6)); + } + Runnable mPendingRunnable = new Runnable() { @Override public void run() { - Fragment fragment = PSLabPinLayoutFragment.newInstance(); + Fragment fragment; + if (fragmentTag.equals(TAG_PINLAYOUT)) { + fragment = PSLabPinLayoutFragment.newInstance(); + } else if (fragmentTag.equals(TAG_PINLAYOUT_V6)) { + fragment = PSLabPinLayoutFragment_v6.newInstance(); + } else { + return; // Exit if no valid tag is provided + } + FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction(); fragmentTransaction.setCustomAnimations(R.anim.fade_in, R.anim.fade_out) - .replace(R.id.frame, fragment, TAG_PINLAYOUT) + .replace(R.id.frame, fragment, fragmentTag) .commitAllowingStateLoss(); } }; + mHandler.post(mPendingRunnable); } diff --git a/app/src/main/java/io/pslab/fragment/PSLabPinLayoutFragment.java b/app/src/main/java/io/pslab/fragment/PSLabPinLayoutFragment.java index 570a3a76c..8b307354d 100644 --- a/app/src/main/java/io/pslab/fragment/PSLabPinLayoutFragment.java +++ b/app/src/main/java/io/pslab/fragment/PSLabPinLayoutFragment.java @@ -247,4 +247,4 @@ private void midPoint(PointF point, MotionEvent event) { } catch (Exception e) {/**/} point.set(x / 2, y / 2); } -} +} \ No newline at end of file diff --git a/app/src/main/java/io/pslab/fragment/PSLabPinLayoutFragment_v6.java b/app/src/main/java/io/pslab/fragment/PSLabPinLayoutFragment_v6.java new file mode 100644 index 000000000..c40322cce --- /dev/null +++ b/app/src/main/java/io/pslab/fragment/PSLabPinLayoutFragment_v6.java @@ -0,0 +1,273 @@ +package io.pslab.fragment; + +import android.annotation.SuppressLint; +import android.app.Activity; +import android.content.Context; +import android.graphics.Bitmap; +import android.graphics.Color; +import android.graphics.Matrix; +import android.graphics.PointF; +import android.os.Bundle; +import android.view.LayoutInflater; +import android.view.MotionEvent; +import android.view.View; +import android.view.ViewGroup; +import android.widget.Button; +import android.widget.ImageView; +import android.widget.TextView; + +import androidx.annotation.NonNull; +import androidx.appcompat.app.AlertDialog; +import androidx.core.content.res.ResourcesCompat; +import androidx.fragment.app.Fragment; + +import java.util.ArrayList; +import java.util.List; + +import io.pslab.R; +import io.pslab.items.PinDetails_v6; + +public class PSLabPinLayoutFragment_v6 extends Fragment implements View.OnTouchListener { + + private final List pinDetails_v6 = new ArrayList<>(); + + private final Matrix matrix = new Matrix(); + private final Matrix savedMatrix = new Matrix(); + + public static boolean topside = true; + + private static final int NONE = 0; + private static final int DRAG = 1; + private static final int ZOOM = 2; + private int mode = NONE; + + private final PointF start = new PointF(); + private final PointF mid = new PointF(); + private float oldDist = 1f; + + private ImageView colorMap; + private ImageView imgLayout; + + public static PSLabPinLayoutFragment_v6 newInstance() { + return new PSLabPinLayoutFragment_v6(); + } + + @Override + public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, + Bundle savedInstanceState) { + View view = inflater.inflate(R.layout.fragment_pin_layout_v6, container, false); + imgLayout = view.findViewById(R.id.img_pslab_pin_layout_v6); + colorMap = view.findViewById(R.id.img_pslab_color_map_v6); + return view; + } + + @SuppressLint("ClickableViewAccessibility") + @Override + public void onResume() { + super.onResume(); + imgLayout.setImageDrawable(ResourcesCompat.getDrawable(getResources(), + topside ? R.drawable.pslab_v6_top : R.drawable.pslab_v6_bottom, null)); + colorMap.setImageDrawable(ResourcesCompat.getDrawable(getResources(), + topside ? R.drawable.pslab_v6_top_colormap : R.drawable.pslab_v6_bottom_colormap, null)); + imgLayout.setOnTouchListener(this); + populatePinDetails(); + } + + @Override + public void onPause() { + super.onPause(); + imgLayout.setImageDrawable(null); + colorMap.setImageDrawable(null); + // Force garbage collection to avoid OOM on older devices. + System.gc(); + } + + private void populatePinDetails() { + // Populate pinDetails with the required data + pinDetails_v6.add(new PinDetails_v6(getString(R.string.txd), getString(R.string.pin_txd_description), getColor(R.color.txd))); + pinDetails_v6.add(new PinDetails_v6(getString(R.string.cen), getString(R.string.cen_description), getColor(R.color.cen))); + pinDetails_v6.add(new PinDetails_v6(getString(R.string.vcc), getString(R.string.pin_vcc_description), getColor(R.color.vcc))); + pinDetails_v6.add(new PinDetails_v6(getString(R.string.gnd), getString(R.string.gnd_description), getColor(R.color.gnd))); + pinDetails_v6.add(new PinDetails_v6(getString(R.string.rxd), getString(R.string.pin_rxd_description), getColor(R.color.rxd))); + pinDetails_v6.add(new PinDetails_v6(getString(R.string.uart_tx), getString(R.string.uart_tx), getColor(R.color.uart_tx))); + pinDetails_v6.add(new PinDetails_v6(getString(R.string.uart_rx), getString(R.string.uart_rx), getColor(R.color.uart_rx))); + + pinDetails_v6.add(new PinDetails_v6(getString(R.string.sine_wave_1), getString(R.string.sine_wave_1_description), getColor(R.color.sine_wave_1))); + pinDetails_v6.add(new PinDetails_v6(getString(R.string.sine_wave_2), getString(R.string.sine_wave_2_description), getColor(R.color.sine_wave_2))); + + pinDetails_v6.add(new PinDetails_v6(getString(R.string.square_wave_1), getString(R.string.square_wave_1_description), getColor(R.color.square_wave_1))); + pinDetails_v6.add(new PinDetails_v6(getString(R.string.square_wave_2), getString(R.string.square_wave_2_description), getColor(R.color.square_wave_2))); + pinDetails_v6.add(new PinDetails_v6(getString(R.string.square_wave_3), getString(R.string.square_wave_3_description), getColor(R.color.square_wave_3))); + pinDetails_v6.add(new PinDetails_v6(getString(R.string.square_wave_3), getString(R.string.square_wave_4_description), getColor(R.color.square_wave_4))); + + pinDetails_v6.add(new PinDetails_v6(getString(R.string.logic_analyzer_1), getString(R.string.logic_analyzer_1_description), getColor(R.color.logic_analyzer_1))); + pinDetails_v6.add(new PinDetails_v6(getString(R.string.logic_analyzer_2), getString(R.string.logic_analyzer_2_description), getColor(R.color.logic_analyzer_2))); + pinDetails_v6.add(new PinDetails_v6(getString(R.string.logic_analyzer_3), getString(R.string.logic_analyzer_3_description), getColor(R.color.logic_analyzer_3))); + pinDetails_v6.add(new PinDetails_v6(getString(R.string.logic_analyzer_4), getString(R.string.logic_analyzer_4_description), getColor(R.color.logic_analyzer_4))); + + pinDetails_v6.add(new PinDetails_v6(getString(R.string.ac_channel), getString(R.string.ac_channel), getColor(R.color.ac_channel))); + pinDetails_v6.add(new PinDetails_v6(getString(R.string.channel_1), getString(R.string.channel_1_description), getColor(R.color.channel_1))); + pinDetails_v6.add(new PinDetails_v6(getString(R.string.channel_2), getString(R.string.channel_2_description), getColor(R.color.channel_2))); + pinDetails_v6.add(new PinDetails_v6(getString(R.string.channel_3), getString(R.string.channel_3_description), getColor(R.color.channel_3))); + pinDetails_v6.add(new PinDetails_v6(getString(R.string.ch3_gain_set), getString(R.string.ch3_gain_set_description), getColor(R.color.ch3_gain_set))); + pinDetails_v6.add(new PinDetails_v6(getString(R.string.microphone), getString(R.string.microphone_description), getColor(R.color.microphone))); + pinDetails_v6.add(new PinDetails_v6(getString(R.string.frequency_v6), getString(R.string.frequency_v6_description), getColor(R.color.frequency))); + pinDetails_v6.add(new PinDetails_v6(getString(R.string.capacitance), getString(R.string.capacitance_v6_description), getColor(R.color.capacitance))); + pinDetails_v6.add(new PinDetails_v6(getString(R.string.pin_res_name), getString(R.string.pin_res_description), getColor(R.color.resistance))); + pinDetails_v6.add(new PinDetails_v6(getString(R.string.pin_vol_name), getString(R.string.pin_vol_description), getColor(R.color.voltage))); + + pinDetails_v6.add(new PinDetails_v6(getString(R.string.pv1), getString(R.string.pv1_description), getColor(R.color.pv1))); + pinDetails_v6.add(new PinDetails_v6(getString(R.string.pv2), getString(R.string.pv2_description), getColor(R.color.pv2))); + pinDetails_v6.add(new PinDetails_v6(getString(R.string.pv3), getString(R.string.pv3_description), getColor(R.color.pv3))); + pinDetails_v6.add(new PinDetails_v6(getString(R.string.pcs), getString(R.string.pcs_description), getColor(R.color.pcs))); + + pinDetails_v6.add(new PinDetails_v6(getString(R.string.chip_select), getString(R.string.chip_select_description), getColor(R.color.chip_select))); + pinDetails_v6.add(new PinDetails_v6(getString(R.string.cs1), getString(R.string.cs1_description), getColor(R.color.cs1))); + pinDetails_v6.add(new PinDetails_v6(getString(R.string.sdi), getString(R.string.sdi_description), getColor(R.color.sdi))); + pinDetails_v6.add(new PinDetails_v6(getString(R.string.sck), getString(R.string.sck_description), getColor(R.color.sclk))); + pinDetails_v6.add(new PinDetails_v6(getString(R.string.sdo), getString(R.string.sdo_description), getColor(R.color.sdo))); + + pinDetails_v6.add(new PinDetails_v6(getString(R.string.sda_for_i2c), getString(R.string.sda_for_i2c_description), getColor(R.color.sda))); + pinDetails_v6.add(new PinDetails_v6(getString(R.string.scl_for_i2c), getString(R.string.scl_for_i2c_description), getColor(R.color.scl))); + + pinDetails_v6.add(new PinDetails_v6(getString(R.string.pin_vdd_name), getString(R.string.pin_vdd_description), getColor(R.color.vdd))); + pinDetails_v6.add(new PinDetails_v6(getString(R.string.current_3ma), getString(R.string.current_3ma_description), getColor(R.color.current_3ma))); + pinDetails_v6.add(new PinDetails_v6(getString(R.string.plus_5v), getString(R.string.plus_5v_description), getColor(R.color.plus_5v))); + pinDetails_v6.add(new PinDetails_v6(getString(R.string.voltage_plus_minus_5_0v), getString(R.string.voltage_plus_minus_5_0v_description), getColor(R.color.plus_minus_5v))); + pinDetails_v6.add(new PinDetails_v6(getString(R.string.voltage_plus_3_3v), getString(R.string.voltage_plus_3_3v_description), getColor(R.color.plus_3_3v))); + pinDetails_v6.add(new PinDetails_v6(getString(R.string.voltage_0_3_3v), getString(R.string.voltage_0_3_3v_description), getColor(R.color.range_0_to_3_3v))); + + pinDetails_v6.add(new PinDetails_v6(getString(R.string.pgc), getString(R.string.pgc_description), getColor(R.color.pgc))); + pinDetails_v6.add(new PinDetails_v6(getString(R.string.pgd), getString(R.string.pgd_description), getColor(R.color.pgd))); + pinDetails_v6.add(new PinDetails_v6(getString(R.string.mclr), getString(R.string.mclr_description), getColor(R.color.mclr))); + pinDetails_v6.add(new PinDetails_v6(getString(R.string.mcl), getString(R.string.mcl_description), getColor(R.color.mclr))); + + pinDetails_v6.add(new PinDetails_v6(getString(R.string.dp), getString(R.string.dp_description), getColor(R.color.dp))); + pinDetails_v6.add(new PinDetails_v6(getString(R.string.dm), getString(R.string.dm_description), getColor(R.color.dm))); + pinDetails_v6.add(new PinDetails_v6(getString(R.string.vusb), getString(R.string.vusb_description), getColor(R.color.vusb))); + + pinDetails_v6.add(new PinDetails_v6(getString(R.string.si1), getString(R.string.pin_si1_description), getColor(R.color.si1))); + pinDetails_v6.add(new PinDetails_v6(getString(R.string.si2), getString(R.string.pin_si2_description), getColor(R.color.si2))); + + pinDetails_v6.add(new PinDetails_v6(getString(R.string.vol), getString(R.string.vol_description), getColor(R.color.vol))); + pinDetails_v6.add(new PinDetails_v6(getString(R.string.res), getString(R.string.res_description), getColor(R.color.res))); + pinDetails_v6.add(new PinDetails_v6(getString(R.string.cap), getString(R.string.cap_v6_description), getColor(R.color.cap))); + pinDetails_v6.add(new PinDetails_v6(getString(R.string.frequency), getString(R.string.frequency_v6_description), getColor(R.color.fqy))); + pinDetails_v6.add(new PinDetails_v6(getString(R.string.mic), getString(R.string.mic_description), getColor(R.color.mic))); + pinDetails_v6.add(new PinDetails_v6(getString(R.string.c3g), getString(R.string.c3g_description), getColor(R.color.c3g))); + + pinDetails_v6.add(new PinDetails_v6(getString(R.string.sq1), getString(R.string.sq1_description), getColor(R.color.sq1))); + pinDetails_v6.add(new PinDetails_v6(getString(R.string.sq2), getString(R.string.sq2_description), getColor(R.color.sq2))); + pinDetails_v6.add(new PinDetails_v6(getString(R.string.sq3), getString(R.string.sq3_description), getColor(R.color.sq3))); + pinDetails_v6.add(new PinDetails_v6(getString(R.string.sq4), getString(R.string.sq4_description), getColor(R.color.sq4))); + + } + + private int getColor(int colorId) { + final Context context = getContext(); + return context == null ? 0 : context.getColor(colorId); + } + + @Override + public boolean onTouch(View v, MotionEvent event) { + ImageView view = (ImageView) v; + imgLayout.setImageMatrix(matrix); + colorMap.setImageMatrix(matrix); + float scale; + + Matrix colorMapMatrix = new Matrix(); + colorMapMatrix.set(colorMap.getImageMatrix()); + + switch (event.getAction() & MotionEvent.ACTION_MASK) { + case MotionEvent.ACTION_DOWN: + matrix.set(view.getImageMatrix()); + savedMatrix.set(matrix); + start.set(event.getX(), event.getY()); + mode = DRAG; + break; + + case MotionEvent.ACTION_UP: + colorMap.setDrawingCacheEnabled(true); + Bitmap clickSpot = Bitmap.createBitmap(colorMap.getDrawingCache()); + colorMap.setDrawingCacheEnabled(false); + try { + int pixel = clickSpot.getPixel((int) event.getX(), (int) event.getY()); + for (PinDetails_v6 pin : pinDetails_v6) { + if (pin.getColorID() == Color.rgb(Color.red(pixel), Color.green(pixel), Color.blue(pixel))) { + displayPinDescription(pin); + } + } + } catch (IllegalArgumentException e) {/**/} + break; + + case MotionEvent.ACTION_POINTER_DOWN: + oldDist = spacing(event); + if (oldDist > 5f) { + savedMatrix.set(matrix); + midPoint(mid, event); + mode = ZOOM; + } + break; + + case MotionEvent.ACTION_MOVE: + if (mode == DRAG) { + matrix.set(savedMatrix); + matrix.postTranslate(event.getX() - start.x, event.getY() - start.y); + } else if (mode == ZOOM) { + float newDist = spacing(event); + if (newDist > 5f) { + matrix.set(savedMatrix); + scale = newDist / oldDist; + matrix.postScale(scale, scale, mid.x, mid.y); + } + } + break; + + default: + break; + } + + return true; + } + + private void displayPinDescription(PinDetails_v6 pinDetails_v6) { + final Activity activity = getActivity(); + + if (activity == null) { + return; + } + + final AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); + LayoutInflater inflater = getActivity().getLayoutInflater(); + View view = inflater.inflate(R.layout.pin_description_dialog, null); + builder.setView(view); + TextView pinTitle = view.findViewById(R.id.pin_description_title); + pinTitle.setText(pinDetails_v6.getName()); + TextView pinDescription = view.findViewById(R.id.pin_description); + pinDescription.setText(pinDetails_v6.getDescription()); + Button dialogButton = view.findViewById(R.id.pin_description_dismiss); + + builder.create(); + final AlertDialog dialog = builder.show(); + + dialogButton.setOnTouchListener((v, event) -> { + view.performClick(); + dialog.dismiss(); + return true; + }); + } + + private float spacing(MotionEvent event) { + if (event.getPointerCount() < 2) return 0; + float x = event.getX(0) - event.getX(1); + float y = event.getY(0) - event.getY(1); + return (float) Math.sqrt(x * x + y * y); + } + + private void midPoint(PointF point, MotionEvent event) { + if (event.getPointerCount() < 2) return; + float x = event.getX(0) + event.getX(1); + float y = event.getY(0) + event.getY(1); + point.set(x / 2, y / 2); + } +} \ No newline at end of file diff --git a/app/src/main/java/io/pslab/items/PinDetails.java b/app/src/main/java/io/pslab/items/PinDetails.java index c5029fc74..73a2225b6 100644 --- a/app/src/main/java/io/pslab/items/PinDetails.java +++ b/app/src/main/java/io/pslab/items/PinDetails.java @@ -33,4 +33,4 @@ public int getCategoryColor() { public int getColorID() { return colorID; } -} +} \ No newline at end of file diff --git a/app/src/main/java/io/pslab/items/PinDetails_v6.java b/app/src/main/java/io/pslab/items/PinDetails_v6.java new file mode 100644 index 000000000..db2656048 --- /dev/null +++ b/app/src/main/java/io/pslab/items/PinDetails_v6.java @@ -0,0 +1,27 @@ +package io.pslab.items; + +public class PinDetails_v6 { + private final String name; + private final String description; + private final int colorID; + + public PinDetails_v6(String name, String description, int colorID) { + this.name = name; + this.description = description; + this.colorID = colorID; + } + + public String getName() { + return name; + } + + public String getDescription() { + return description; + } + + + public int getColorID() { + return colorID; + } + +} diff --git a/app/src/main/res/drawable/pslab_v6_bottom.png b/app/src/main/res/drawable/pslab_v6_bottom.png new file mode 100644 index 000000000..1c65ebea2 Binary files /dev/null and b/app/src/main/res/drawable/pslab_v6_bottom.png differ diff --git a/app/src/main/res/drawable/pslab_v6_bottom_colormap.png b/app/src/main/res/drawable/pslab_v6_bottom_colormap.png new file mode 100644 index 000000000..8c07a0d47 Binary files /dev/null and b/app/src/main/res/drawable/pslab_v6_bottom_colormap.png differ diff --git a/app/src/main/res/drawable/pslab_v6_top.png b/app/src/main/res/drawable/pslab_v6_top.png new file mode 100644 index 000000000..d4d7412e6 Binary files /dev/null and b/app/src/main/res/drawable/pslab_v6_top.png differ diff --git a/app/src/main/res/drawable/pslab_v6_top_colormap.png b/app/src/main/res/drawable/pslab_v6_top_colormap.png new file mode 100644 index 000000000..df054ecca Binary files /dev/null and b/app/src/main/res/drawable/pslab_v6_top_colormap.png differ diff --git a/app/src/main/res/layout/fragment_pin_layout_v6.xml b/app/src/main/res/layout/fragment_pin_layout_v6.xml new file mode 100644 index 000000000..47ff84e68 --- /dev/null +++ b/app/src/main/res/layout/fragment_pin_layout_v6.xml @@ -0,0 +1,23 @@ + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/menu/pslab_connectivity_menu.xml b/app/src/main/res/menu/pslab_connectivity_menu.xml index c8d523ed6..db125f949 100644 --- a/app/src/main/res/menu/pslab_connectivity_menu.xml +++ b/app/src/main/res/menu/pslab_connectivity_menu.xml @@ -17,12 +17,20 @@ android:title="@string/text_disconnected" app:showAsAction="ifRoom|withText" /> + + diff --git a/app/src/main/res/values-si/string.xml b/app/src/main/res/values-si/string.xml index 73618b476..ca8f8178f 100644 --- a/app/src/main/res/values-si/string.xml +++ b/app/src/main/res/values-si/string.xml @@ -1,5 +1,5 @@ - + PSLab open_drawer close_drawer @@ -1026,4 +1026,6 @@ යෙදුම ශ්‍රේණිගත කරන්න සංවර්ධකයින් \\u0020ms + + diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index eda120f69..34501bd84 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -70,7 +70,7 @@ #724fff #ffa64f #ff2b4f - #6b6500 + #6b6500 #765f40 #681654 #a68b47 @@ -83,4 +83,72 @@ #FF4040 #406743 + + + #FFB380 + #FF9955 + #00FF00 + #00FFFF + #FF7F2A + #EEFFAA + #E5FF80 + #FFCC00 + #D4AA00 + #FFAAAA + #FF8080 + #FF5555 + #FF2A2A + #D5FFE6 + #AAFFCC + #80FFB3 + #55FF99 + #0000FF + #AACCFF + #80B3FF + #5599FF + #2A7FFF + #0066FF + #0055D4 + #0044AA + #003380 + #002255 + #E3DBDE + #C8B7BE + #AC939D + #916F7C + #800080 + #F4D7E3 + #E9AFC6 + #DE87AA + #D35F8D + #C83771 + #A02C5A + #AA0044 + #D40055 + #FF0066 + #800066 + #AA0088 + #D400AA + #000080 + #D7EEF4 + #AFDDE9 + #87CDDE + #5FBCD3 + #E5D5FF + #CCAAFF + #B380FF + #9955FF + #7F2AFF + #6600FF + #55FF99 + #80FFB3 + #AAFFCC + #D5FFE6 + #2B0000 + #F4D7EE + #E9AFDD + #DE87CD + #D35FBC + #C837AB + #A02C89 \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 1de834d4f..355a88fdb 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -16,9 +16,11 @@ FAQ Share App Generate Config File - Pin Layout - Pin Layout Front - Pin Layout Back + PinLayout + Pin Layout Front (V5) + Pin Layout Back (V5) + Pin Layout Front (V6) + Pin Layout Back (V6) Bluetooth Connection Connect using Bluetooth or Wi-Fi Bluetooth @@ -1099,17 +1101,17 @@ Legacy Firmware Detected We have detected that your PSLab device is running legacy firmware. Please note that support for this firmware has ended. For the best experience and continued support, please update your device to the latest firmware version. ESP - ESP Programmer pin + ESP Programmer pin RXD - Receiver pin for UART communication + Receiver pin for UART communication TXD - Transmitter pin for UART communication + Transmitter pin for UART communication GND - Ground pin (0 V) + Ground pin (0 V) SI1 - Wave generator pin 1 + Wave generator pin 1 SI2 - Wave generator pin 2 + Wave generator pin 2 SQ1 PWM generator pin 1 SQ2 @@ -1151,9 +1153,9 @@ PV3 Programmable voltage source 3 (0-3.3 V) PV2 - Programmable voltage source 2 (-+3.3 V) + Programmable voltage source 2 (-3.3 to +3.3 V) PV1 - Programmable voltage source 1 (-+5.0 V) + Programmable voltage source 1 (-5.0 to +5.0 V) SCL Serial clock pin for I2C SDA @@ -1162,20 +1164,20 @@ Voltage supply pin (3.3 V) STA Bluetooth device state output pin - V+" - Voltage test pin (+8.0 V)" + V+ + Voltage test pin (+8.0 V) ENA Bluetooth device enable/disable pin - V-" - Voltage test pin (-8.0 V)" + V- + Voltage test pin (-8.0 V) MCL Master clear pin for programmer PGM Mode pin for programmer PGC - Clock pin for programmer + Clock pin for programmer PGD - Data pin for programmer + Data pin for programmer NRF Radio communication module using nRF24 USB @@ -1184,14 +1186,201 @@ Voltage supply pin (+5.0 V) +5V Test pin +5.0 V - D+" - Test pin for USB Data +" - D-" - Test pin for USB Data -" + D+ + Test pin for USB Data + + D- + Test pin for USB Data - Channels - Timebase \u0026 Trigger + Timebase & Trigger Offsets Automatic Measurements XY Plot + Pin Layout + + + TXD + CEN + VCC + GND + RXD + UART TX + UART RX + + Sine Wave 1 + Sine Wave 2 + + Square Wave 1 + Square Wave 2 + Square Wave 3 + Square Wave 4 + SQ1 + SQ2 + SQ3 + SQ4 + + Logic Analyzer 1 + Logic Analyzer 2 + Logic Analyzer 3 + Logic Analyzer 4 + LA1 + LA2 + LA3 + LA4 + + AC Channel + Channel 1 + Channel 2 + Channel 3 + CH3 Gain Set + Microphone + Frequency + Capacitance + Resistance + Voltage + CH1 + CH2 + CH3 + ACH + PV1 + PV2 + PV3 + + Chip Select + SDI for SPI + SCLK for SPI + SDO for SPI + CS1 + SDI + SCK + SDO + + SDA for I²C + SCL for I²C + SDA + SCL + + VDD (+3.3V) + (0-3.3V) + (+3.3V) + (±5.0V) + (3mA) + +5V + + PGC + PGD + MCLR + MCL + + DP + DM + VUSB + + SI1 + SI2 + PCS + VOL + RES + CAP + FQY + MIC + C3G + + + Transmit data pin for UART communication. + Chip Enable pin for UART control. + Voltage supply pin (+5V or +3.3V). + Ground pin for system reference. + Receive data pin for UART communication. + Transmitting data pin for UART. + Receiving data pin for UART. + + + Sine wave signal output 1. + Sine wave signal output 2. + + + Square wave output 1. + Square wave output 2. + Square wave output 3. + Square wave output 4. + Square wave pin 1. + Square wave pin 2. + Square wave pin 3. + Square wave pin 4. + + + Logic analyzer pin 1. + Logic analyzer pin 2. + Logic analyzer pin 3. + Logic analyzer pin 4. + Logic analyzer channel 1. + Logic analyzer channel 2. + Logic analyzer channel 3. + Logic analyzer channel 4. + + + AC measurement channel. + Oscilloscope Channel 1. + Oscilloscope Channel 2. + Oscilloscope Channel 3. + Channel 3 gain setting. + Microphone input pin. + Frequency measurement pin. + Capacitance measurement pin. + Resistance measurement pin. + Voltage measurement pin. + Measurement channel 1 (v6). + Measurement channel 2 (v6). + Measurement channel 3 (v6). + AC channel for advanced measurements. + Voltage pin PV1. + Voltage pin PV2. + Voltage pin PV3. + + + Chip select pin for SPI communication. + Serial Data Input pin for SPI. + Serial Clock pin for SPI. + Serial Data Output pin for SPI. + Chip select pin 1 for SPI. + Serial Data Input pin. + Serial Clock pin. + Serial Data Output pin. + + + Serial Data pin for I²C communication. + Serial Clock pin for I²C communication. + Serial Data pin (I²C). + Serial Clock pin (I²C). + + + VDD (+3.3V) power supply pin. + Variable voltage pin (0-3.3V). + Variable voltage pin (±3.3V) + Variable voltage (±5.0V). + Current pin (3mA). + 5V power supply pin. + + + Programming Clock pin. + Programming Data pin. + Master Clear pin for reset. + Master Clear pin (alternative). + + + USB Data Plus pin. + USB Data Minus pin. + USB voltage pin. + + + Signal Input 1 pin. + Signal Input 2 pin. + Current Source pin. + Voltage measurement pin. + Resistance measurement pin. + Capacitance measurement pin (v6). + Frequency measurement pin (v6). + Microphone input pin (v6). + Channel 3 Gain Setting.